diff options
Diffstat (limited to 'experimental/tqtinterface/qt4/qmake/project.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/qmake/project.cpp | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/experimental/tqtinterface/qt4/qmake/project.cpp b/experimental/tqtinterface/qt4/qmake/project.cpp index 2278904c5..c3aeccda3 100644 --- a/experimental/tqtinterface/qt4/qmake/project.cpp +++ b/experimental/tqtinterface/qt4/qmake/project.cpp @@ -211,7 +211,7 @@ bool TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place) { TQString s = t.simplifyWhiteSpace(); - int hash_mark = s.tqfind("#"); + int hash_mark = s.find("#"); if(hash_mark != -1) //good bye comments s = s.left(hash_mark); if(s.isEmpty()) /* blank_line */ @@ -228,7 +228,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place) } if(!(scope_flag & (0x01 << scope_block))) { /* adjust scope for each block which appears on a single line */ - for(int i = (s.tqcontains('{')-s.tqcontains('}')); i>0; i--) + for(int i = (s.contains('{')-s.contains('}')); i>0; i--) scope_flag &= ~(0x01 << (++scope_block)); debug_msg(1, "Project Parser: %s:%d : Ignored due to block being false.", parser.file.latin1(), parser.line_no); @@ -290,10 +290,10 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place) bool invert_test = (comp_scope.left(1) == "!"); if(invert_test) comp_scope = comp_scope.right(comp_scope.length()-1); - int lparen = comp_scope.tqfind('('); + int lparen = comp_scope.find('('); if(or_op == scope_failed) { if(lparen != -1) { /* if there is an lparen in the scope, it IS a function */ - int rparen = comp_scope.tqfindRev(')'); + int rparen = comp_scope.findRev(')'); if(rparen == -1) { TQCString error; error.sprintf("Function missing right paren: %s ('%s')", @@ -356,13 +356,13 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place) } SKIP_WS(d); - for( ; *d && op.tqfind('=') == -1; op += *(d++)) + for( ; *d && op.find('=') == -1; op += *(d++)) ; - op.tqreplace(TQRegExp("\\s"), ""); + op.replace(TQRegExp("\\s"), ""); SKIP_WS(d); - TQString vals(d); /* vals now tqcontains the space separated list of values */ - int rbraces = vals.tqcontains('}'), lbraces = vals.tqcontains('{'); + TQString vals(d); /* vals now contains the space separated list of values */ + int rbraces = vals.contains('}'), lbraces = vals.contains('{'); if(scope_block && rbraces - lbraces == 1) { debug_msg(1, "Project Parser: %s:%d : Leaving block %d", parser.file.latin1(), parser.line_no, scope_block); @@ -420,14 +420,14 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place) } bool global = FALSE, case_sense = TRUE; if(func.count() == 4) { - global = func[3].tqfind('g') != -1; - case_sense = func[3].tqfind('i') == -1; + global = func[3].find('g') != -1; + case_sense = func[3].find('i') == -1; } TQRegExp regexp(func[1], case_sense); for(TQStringList::Iterator varit = varlist.begin(); varit != varlist.end(); ++varit) { - if((*varit).tqcontains(regexp)) { - (*varit) = (*varit).tqreplace(regexp, func[2]); + if((*varit).contains(regexp)) { + (*varit) = (*varit).replace(regexp, func[2]); if(!global) break; } @@ -443,7 +443,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place) valit != vallist.end(); ++valit) { if((*valit).isEmpty()) continue; - if((op == "*=" && !(*varlist.tqfind((*valit)))) || + if((op == "*=" && !(*varlist.find((*valit)))) || op == "=" || op == "+=") varlist.append((*valit)); else if(op == "-=") @@ -484,7 +484,7 @@ TQMakeProject::read(const TQString &file, TQMap<TQString, TQStringList> &place) line = t.readLine().stripWhiteSpace(); int prelen = line.length(); - int hash_mark = line.tqfind("#"); + int hash_mark = line.find("#"); if(hash_mark != -1) //good bye comments line = line.left(hash_mark); if(!line.isEmpty() && line.right(1) == "\\") { @@ -532,12 +532,12 @@ TQMakeProject::read(uchar cmd) base_vars["TEMPLATE_PREFIX"] = Option::user_template_prefix; if(cmd & ReadCache && Option::mkfile::do_cache) { /* parse the cache */ - if(Option::mkfile::cachefile.isEmpty()) { //tqfind it as it has not been specified + if(Option::mkfile::cachefile.isEmpty()) { //find it as it has not been specified TQString dir = TQDir::convertSeparators(Option::output_dir); while(!TQFile::exists((Option::mkfile::cachefile = dir + TQDir::separator() + ".qmake.cache"))) { - dir = dir.left(dir.tqfindRev(TQDir::separator())); - if(dir.isEmpty() || dir.tqfind(TQDir::separator()) == -1) { + dir = dir.left(dir.findRev(TQDir::separator())); + if(dir.isEmpty() || dir.find(TQDir::separator()) == -1) { Option::mkfile::cachefile = ""; break; } @@ -581,7 +581,7 @@ TQMakeProject::read(uchar cmd) } } if(!found_mkspec) { - fprintf(stderr, "Could not tqfind mkspecs for your TQMAKESPEC after trying:\n\t%s\n", + fprintf(stderr, "Could not find mkspecs for your TQMAKESPEC after trying:\n\t%s\n", mkspec_roots.join("\n\t").latin1()); return FALSE; } @@ -672,10 +672,10 @@ TQMakeProject::read(uchar cmd) // TQFileInfo fi(pfile); // fi.baseName(); TQString tmp = pfile; - if(tmp.tqfindRev('/') != -1) - tmp = tmp.right( tmp.length() - tmp.tqfindRev('/') - 1 ); - if(tmp.tqfindRev('.') != -1) - tmp = tmp.left(tmp.tqfindRev('.')); + if(tmp.findRev('/') != -1) + tmp = tmp.right( tmp.length() - tmp.findRev('/') - 1 ); + if(tmp.findRev('.') != -1) + tmp = tmp.left(tmp.findRev('.')); vars["TARGET"].append(tmp); } @@ -718,7 +718,7 @@ TQMakeProject::isActiveConfig(const TQString &x, bool regex, TQMap<TQString, TQS TQRegExp re(x, FALSE, TRUE); TQString spec = Option::mkfile::qmakespec.right(Option::mkfile::qmakespec.length() - - (Option::mkfile::qmakespec.tqfindRev(TQDir::separator())+1)); + (Option::mkfile::qmakespec.findRev(TQDir::separator())+1)); if((regex && re.exactMatch(spec)) || (!regex && spec == x)) return TRUE; #ifdef TQ_OS_UNIX @@ -730,8 +730,8 @@ TQMakeProject::isActiveConfig(const TQString &x, bool regex, TQMap<TQString, TQS if(l != -1) { buffer[l] = '\0'; TQString r = buffer; - if(r.tqfindRev('/') != -1) - r = r.mid(r.tqfindRev('/') + 1); + if(r.findRev('/') != -1) + r = r.mid(r.findRev('/') + 1); if((regex && re.exactMatch(r)) || (!regex && r == x)) return TRUE; } @@ -795,7 +795,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt return TRUE; //regular expression I guess TQString dirstr = TQDir::currentDirPath(); - int slsh = file.tqfindRev(Option::dir_sep); + int slsh = file.findRev(Option::dir_sep); if(slsh != -1) { dirstr = file.left(slsh+1); file = file.right(file.length() - slsh - 1); @@ -809,9 +809,9 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt return FALSE; } return system(args.first().latin1()) == 0; - } else if(func == "tqcontains") { + } else if(func == "contains") { if(args.count() != 2) { - fprintf(stderr, "%s:%d: tqcontains(var, val) requires two arguments.\n", parser.file.latin1(), + fprintf(stderr, "%s:%d: contains(var, val) requires two arguments.\n", parser.file.latin1(), parser.line_no); return FALSE; } @@ -832,11 +832,11 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt TQString file = args[0]; doVariableReplace(file, place); fixEnvVariables(file); - int di = file.tqfindRev(Option::dir_sep); + int di = file.findRev(Option::dir_sep); TQDir sunworkshop42workaround = TQDir::current(); TQString oldpwd = sunworkshop42workaround.currentDirPath(); if(di != -1) { - if(!TQDir::setCurrent(file.left(file.tqfindRev(Option::dir_sep)))) { + if(!TQDir::setCurrent(file.left(file.findRev(Option::dir_sep)))) { fprintf(stderr, "Cannot find directory: %s\n", TQT_TQSTRING(file.left(di)).latin1()); return FALSE; } @@ -893,12 +893,12 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt TQString file = args.first(); file = Option::fixPathToLocalOS(file); - file.tqreplace("\"", ""); + file.replace("\"", ""); doVariableReplace(file, place); if(func == "load") { if(!file.endsWith(Option::prf_ext)) file += Option::prf_ext; - if(file.tqfind(Option::dir_sep) == -1 || !TQFile::exists(file)) { + if(file.find(Option::dir_sep) == -1 || !TQFile::exists(file)) { bool found = FALSE; const TQString concat = TQDir::separator() + TQString("mkspecs") + TQDir::separator() + TQString("features"); @@ -976,11 +976,11 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt parser.file.latin1(), parser.line_no); debug_msg(1, "Project Parser: %s'ing file %s.", func.latin1(), file.latin1()); TQString orig_file = file; - int di = file.tqfindRev(Option::dir_sep); + int di = file.findRev(Option::dir_sep); TQDir sunworkshop42workaround = TQDir::current(); TQString oldpwd = sunworkshop42workaround.currentDirPath(); if(di != -1) { - if(!TQDir::setCurrent(file.left(file.tqfindRev(Option::dir_sep)))) { + if(!TQDir::setCurrent(file.left(file.findRev(Option::dir_sep)))) { fprintf(stderr, "Cannot find directory: %s\n", TQT_TQSTRING(file.left(di)).latin1()); return FALSE; } @@ -1018,9 +1018,9 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt TQString msg = args.first(); if((msg.startsWith("\"") || msg.startsWith("'")) && msg.endsWith(msg.left(1))) msg = msg.mid(1, msg.length()-2); - msg.tqreplace(TQString("${TQMAKE_FILE}"), parser.file.latin1()); - msg.tqreplace(TQString("${TQMAKE_LINE_NUMBER}"), TQString::number(parser.line_no)); - msg.tqreplace(TQString("${TQMAKE_DATE}"), TQDateTime::tqcurrentDateTime().toString()); + msg.replace(TQString("${TQMAKE_FILE}"), parser.file.latin1()); + msg.replace(TQString("${TQMAKE_LINE_NUMBER}"), TQString::number(parser.line_no)); + msg.replace(TQString("${TQMAKE_DATE}"), TQDateTime::tqcurrentDateTime().toString()); doVariableReplace(msg, place); fixEnvVariables(msg); fprintf(stderr, "Project %s: %s\n", func.upper().latin1(), msg.latin1()); @@ -1047,9 +1047,9 @@ TQMakeProject::doProjectCheckReqs(const TQStringList &deps, TQMap<TQString, TQSt chk = chk.right(chk.length() - 1); bool test; - int lparen = chk.tqfind('('); + int lparen = chk.find('('); if(lparen != -1) { /* if there is an lparen in the chk, it IS a function */ - int rparen = chk.tqfindRev(')'); + int rparen = chk.findRev(')'); if(rparen == -1) { TQCString error; error.sprintf("Function (in REQUIRES) missing right paren: %s", chk.latin1()); @@ -1079,11 +1079,11 @@ TQMakeProject::doProjectCheckReqs(const TQStringList &deps, TQMap<TQString, TQSt TQString TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringList> &place) { - for(int var_begin, var_last=0; (var_begin = str.tqfind("$$", var_last)) != -1; var_last = var_begin) { + for(int var_begin, var_last=0; (var_begin = str.find("$$", var_last)) != -1; var_last = var_begin) { if(var_begin >= (int)str.length() + 2) { break; } else if(var_begin != 0 && str[var_begin-1] == '\\') { - str.tqreplace(var_begin-1, 1, ""); + str.replace(var_begin-1, 1, ""); var_begin += 1; continue; } @@ -1111,7 +1111,7 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi if(as_env) { if(str[var_incr] != ')') { var_incr++; - warn_msg(WarnParser, "%s:%d: Unterminated env-variable tqreplacement '%s' (%s)", + warn_msg(WarnParser, "%s:%d: Unterminated env-variable replacement '%s' (%s)", parser.file.latin1(), parser.line_no, TQT_TQSTRING(str.mid(var_begin, TQMAX(var_incr - var_begin, (int)str.length()))).latin1(), str.latin1()); @@ -1122,7 +1122,7 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi } else if(as_prop) { if(str[var_incr] != ']') { var_incr++; - warn_msg(WarnParser, "%s:%d: Unterminated prop-variable tqreplacement '%s' (%s)", + warn_msg(WarnParser, "%s:%d: Unterminated prop-variable replacement '%s' (%s)", parser.file.latin1(), parser.line_no, TQT_TQSTRING(str.mid(var_begin, TQMAX(var_incr - var_begin, int(str.length())))).latin1(), str.latin1()); var_begin += var_incr; @@ -1147,7 +1147,7 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi } if(var_incr > (int)str.length() || (in_braces && str[var_incr] != '}')) { var_incr++; - warn_msg(WarnParser, "%s:%d: Unterminated variable tqreplacement '%s' (%s)", + warn_msg(WarnParser, "%s:%d: Unterminated variable replacement '%s' (%s)", parser.file.latin1(), parser.line_no, TQT_TQSTRING(str.mid(var_begin, TQMAX(var_incr - var_begin, (int)str.length()))).latin1(), str.latin1()); @@ -1157,27 +1157,27 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi var_incr++; } - TQString tqreplacement; + TQString replacement; if(as_env) { - tqreplacement = getenv(val); + replacement = getenv(val); } else if(as_prop) { if(prop) - tqreplacement = prop->value(val); + replacement = prop->value(val); } else if(args.isEmpty()) { if(val.left(1) == ".") - tqreplacement = ""; + replacement = ""; else if(val == "LITERAL_WHITESPACE") - tqreplacement = "\t"; + replacement = "\t"; else if(val == "LITERAL_DOLLAR") - tqreplacement = "$"; + replacement = "$"; else if(val == "LITERAL_HASH") - tqreplacement = "#"; + replacement = "#"; else if(val == "PWD") - tqreplacement = TQDir::currentDirPath(); + replacement = TQDir::currentDirPath(); else if(val == "DIR_SEPARATOR") - tqreplacement = Option::dir_sep; + replacement = Option::dir_sep; else - tqreplacement = place[varMap(val)].join(" "); + replacement = place[varMap(val)].join(" "); } else { TQStringList arg_list = split_arg_list(doVariableReplace(args, place)); debug_msg(1, "Running function: %s( %s )", val.latin1(), arg_list.join("::").latin1()); @@ -1200,9 +1200,9 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi if(end < start) end = start; for(int i = start; i <= end && (int)var.count() >= i; i++) { - if(!tqreplacement.isEmpty()) - tqreplacement += " "; - tqreplacement += var[i]; + if(!replacement.isEmpty()) + replacement += " "; + replacement += var[i]; } } } else if(val.lower() == "fromfile") { @@ -1212,7 +1212,7 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi } else { TQString file = arg_list[0]; file = Option::fixPathToLocalOS(file); - file.tqreplace("\"", ""); + file.replace("\"", ""); if(TQDir::isRelativePath(file)) { TQStringList include_roots; @@ -1230,10 +1230,10 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi } } TQString orig_file = file; - int di = file.tqfindRev(Option::dir_sep); + int di = file.findRev(Option::dir_sep); TQDir sunworkshop42workaround = TQDir::current(); TQString oldpwd = sunworkshop42workaround.currentDirPath(); - if(di != -1 && TQDir::setCurrent(file.left(file.tqfindRev(Option::dir_sep)))) + if(di != -1 && TQDir::setCurrent(file.left(file.findRev(Option::dir_sep)))) file = file.right(file.length() - di - 1); parser_info pi = parser; int sb = scope_block; @@ -1242,7 +1242,7 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi TQMap<TQString, TQStringList> tmp; bool r = read(file.latin1(), tmp); if(r) { - tqreplacement = tmp[arg_list[1]].join(" "); + replacement = tmp[arg_list[1]].join(" "); vars["TQMAKE_INTERNAL_INCLUDED_FILES"].append(orig_file); } else { warn_msg(WarnParser, "%s:%d: Failure to include file %s.", @@ -1257,14 +1257,14 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi } else if(val.lower() == "eval") { for(TQStringList::ConstIterator arg_it = arg_list.begin(); arg_it != arg_list.end(); ++arg_it) { - if(!tqreplacement.isEmpty()) - tqreplacement += " "; - tqreplacement += place[(*arg_it)].join(" "); + if(!replacement.isEmpty()) + replacement += " "; + replacement += place[(*arg_it)].join(" "); } } else if(val.lower() == "list") { static int x = 0; - tqreplacement.sprintf(".TQMAKE_INTERNAL_TMP_VAR_%d", x++); - TQStringList &lst = (*((TQMap<TQString, TQStringList>*)&place))[tqreplacement]; + replacement.sprintf(".TQMAKE_INTERNAL_TMP_VAR_%d", x++); + TQStringList &lst = (*((TQMap<TQString, TQStringList>*)&place))[replacement]; lst.clear(); for(TQStringList::ConstIterator arg_it = arg_list.begin(); arg_it != arg_list.end(); ++arg_it) @@ -1276,14 +1276,14 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi } else { TQString glue, before, after; if(arg_list.count() >= 2) - glue = arg_list[1].tqreplace("\"", "" ); + glue = arg_list[1].replace("\"", "" ); if(arg_list.count() >= 3) - before = arg_list[2].tqreplace("\"", "" ); + before = arg_list[2].replace("\"", "" ); if(arg_list.count() == 4) - after = arg_list[3].tqreplace("\"", "" ); + after = arg_list[3].replace("\"", "" ); const TQStringList &var = place[varMap(arg_list.first())]; if(!var.isEmpty()) - tqreplacement = before + var.join(glue) + after; + replacement = before + var.join(glue) + after; } } else if(val.lower() == "split") { if(arg_list.count() < 2 || arg_list.count() > 3) { @@ -1297,15 +1297,15 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi for(TQStringList::Iterator vit = var.begin(); vit != var.end(); ++vit) { TQStringList lst = TQStringList::split(sep, (*vit)); for(TQStringList::Iterator spltit = lst.begin(); spltit != lst.end(); ++spltit) { - if(!tqreplacement.isEmpty()) - tqreplacement += join; - tqreplacement += (*spltit); + if(!replacement.isEmpty()) + replacement += join; + replacement += (*spltit); } } } - } else if(val.lower() == "tqfind") { + } else if(val.lower() == "find") { if(arg_list.count() != 2) { - fprintf(stderr, "%s:%d tqfind(var, str) requires two arguments\n", + fprintf(stderr, "%s:%d find(var, str) requires two arguments\n", parser.file.latin1(), parser.line_no); } else { TQRegExp regx(arg_list[1]); @@ -1313,9 +1313,9 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi for(TQStringList::ConstIterator vit = var.begin(); vit != var.end(); ++vit) { if(regx.search(*vit) != -1) { - if(!tqreplacement.isEmpty()) - tqreplacement += " "; - tqreplacement += (*vit); + if(!replacement.isEmpty()) + replacement += " "; + replacement += (*vit); } } } @@ -1335,7 +1335,7 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi buff[i] = ' '; } buff[read_in] = '\0'; - tqreplacement += buff; + replacement += buff; } } } else if(val.lower() == "files") { @@ -1345,16 +1345,16 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi } else { TQString dir, regex = arg_list[0]; regex = Option::fixPathToLocalOS(regex); - regex.tqreplace("\"", ""); - if(regex.tqfindRev(TQDir::separator()) != -1) { - dir = regex.left(regex.tqfindRev(TQDir::separator()) + 1); + regex.replace("\"", ""); + if(regex.findRev(TQDir::separator()) != -1) { + dir = regex.left(regex.findRev(TQDir::separator()) + 1); regex = regex.right(regex.length() - dir.length()); } TQDir d(dir, regex); for(int i = 0; i < (int)d.count(); i++) { - if(!tqreplacement.isEmpty()) - tqreplacement += " "; - tqreplacement += dir + d[i]; + if(!replacement.isEmpty()) + replacement += " "; + replacement += dir + d[i]; } } } else if(val.lower() == "prompt") { @@ -1368,9 +1368,9 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi TQString msg = arg_list.first(); if((msg.startsWith("\"") || msg.startsWith("'")) && msg.endsWith(msg.left(1))) msg = msg.mid(1, msg.length()-2); - msg.tqreplace(TQString("${TQMAKE_FILE}"), parser.file.latin1()); - msg.tqreplace(TQString("${TQMAKE_LINE_NUMBER}"), TQString::number(parser.line_no)); - msg.tqreplace(TQString("${TQMAKE_DATE}"), TQDateTime::tqcurrentDateTime().toString()); + msg.replace(TQString("${TQMAKE_FILE}"), parser.file.latin1()); + msg.replace(TQString("${TQMAKE_LINE_NUMBER}"), TQString::number(parser.line_no)); + msg.replace(TQString("${TQMAKE_DATE}"), TQDateTime::tqcurrentDateTime().toString()); doVariableReplace(msg, place); fixEnvVariables(msg); if(!msg.endsWith("?")) @@ -1380,20 +1380,20 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi TQFile qfile; if(qfile.open(IO_ReadOnly, stdin)) { TQTextStream t( TQT_TQIODEVICE(&qfile) ); - tqreplacement = t.readLine(); + replacement = t.readLine(); } } } else { - fprintf(stderr, "%s:%d: Unknown tqreplace function: %s\n", + fprintf(stderr, "%s:%d: Unknown replace function: %s\n", parser.file.latin1(), parser.line_no, val.latin1()); } } - //actually do tqreplacement now.. + //actually do replacement now.. int mlen = var_incr - var_begin; - debug_msg(2, "Project Parser [var tqreplace]: '%s' :: %s -> %s", str.latin1(), - TQT_TQSTRING(str.mid(var_begin, mlen)).latin1(), tqreplacement.latin1()); - str.tqreplace(var_begin, mlen, tqreplacement); - var_begin += tqreplacement.length(); + debug_msg(2, "Project Parser [var replace]: '%s' :: %s -> %s", str.latin1(), + TQT_TQSTRING(str.mid(var_begin, mlen)).latin1(), replacement.latin1()); + str.replace(var_begin, mlen, replacement); + var_begin += replacement.length(); } return str; } |