diff options
Diffstat (limited to 'experimental/tqtinterface/qt4/qmake/generators/makefile.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/qmake/generators/makefile.cpp | 246 |
1 files changed, 123 insertions, 123 deletions
diff --git a/experimental/tqtinterface/qt4/qmake/generators/makefile.cpp b/experimental/tqtinterface/qt4/qmake/generators/makefile.cpp index 5036889ed..0dc64a3a2 100644 --- a/experimental/tqtinterface/qt4/qmake/generators/makefile.cpp +++ b/experimental/tqtinterface/qt4/qmake/generators/makefile.cpp @@ -111,7 +111,7 @@ static char *gimme_buffer(off_t s) bool MakefileGenerator::generateMocList(const TQString &fn_target) { - if(!tqfindMocDestination(fn_target).isEmpty()) + if(!findMocDestination(fn_target).isEmpty()) return TRUE; TQString fn_local = Option::fixPathToLocalOS(fileFixify(fn_target, TQDir::currentDirPath(), Option::output_dir)); @@ -192,9 +192,9 @@ MakefileGenerator::generateMocList(const TQString &fn_target) debug_msg(2, "Mocgen: %s:%d Found TQMOC symbol %s", fn_target.latin1(), line_count, big_buffer+x); - int ext_pos = fn_target.tqfindRev('.'); + int ext_pos = fn_target.findRev('.'); int ext_len = fn_target.length() - ext_pos; - int dir_pos = fn_target.tqfindRev(Option::dir_sep, ext_pos); + int dir_pos = fn_target.findRev(Option::dir_sep, ext_pos); TQString tqmocFile; if(!project->isEmpty("TQMOC_DIR")) tqmocFile = project->first("TQMOC_DIR"); @@ -210,7 +210,7 @@ MakefileGenerator::generateMocList(const TQString &fn_target) if(cpp_ext) { tqmocFile += Option::cpp_tqmoc_mod + fn_target.mid(dir_pos+1, ext_pos - dir_pos-1) + Option::cpp_tqmoc_ext; project->variables()["_SRCTQMOC"].append(tqmocFile); - } else if(project->variables()["HEADERS"].tqfindIndex(fn_target) != -1) { + } else if(project->variables()["HEADERS"].findIndex(fn_target) != -1) { for(TQStringList::Iterator hit = Option::h_ext.begin(); hit != Option::h_ext.end(); ++hit) { if((fn_target.right(ext_len) == (*hit))) { @@ -249,7 +249,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons return TRUE; setProcessedDependencies(f, TRUE); - TQStringList &fndeps = tqfindDependencies(f); + TQStringList &fndeps = findDependencies(f); TQString fn = fileFixify(f, TQDir::currentDirPath(), Option::output_dir); fn = Option::fixPathToLocalOS(fn, FALSE); TQString fix_env_fn = Option::fixPathToLocalOS(fn); @@ -261,10 +261,10 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons return FALSE; //shouldn't happen TQString fndir, fix_env_fndir; - int dl = fn.tqfindRev(Option::dir_sep); + int dl = fn.findRev(Option::dir_sep); if(dl != -1) fndir = fn.left(dl+1); - dl = fix_env_fn.tqfindRev(Option::dir_sep); + dl = fix_env_fn.findRev(Option::dir_sep); if(dl != -1) fix_env_fndir = fix_env_fn.left(dl + 1); @@ -417,7 +417,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons if(where == "in implementation") { TQString cpp = fn.left(fn.length() - Option::ui_ext.length()) + Option::cpp_ext.first(); - outdeps = &tqfindDependencies(cpp); + outdeps = &findDependencies(cpp); } } } @@ -457,7 +457,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons fqn = inc; goto handle_fqn; } else { - if((Option::target_mode == Option::TARG_MAC9_MODE && inc.tqfind(':')) || + if((Option::target_mode == Option::TARG_MAC9_MODE && inc.find(':')) || (Option::target_mode == Option::TARG_WIN_MODE && inc[1] != ':') || ((Option::target_mode == Option::TARG_UNIX_MODE || Option::target_mode == Option::TARG_TQNX6_MODE || @@ -477,13 +477,13 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons //however these can be turned off at runtime, I'm not sure how //reliable these will be, most likely when problems arise turn it off //and see if they go away.. - if(depHeuristics.tqcontains(inc)) { + if(depHeuristics.contains(inc)) { fqn = depHeuristics[inc]; from_source_dir = FALSE; } else if(Option::mkfile::do_dep_heuristics) { //some heuristics.. //is it a file from a .ui? TQString inc_file = inc.section(Option::dir_sep, -1); - int extn = inc_file.tqfindRev('.'); + int extn = inc_file.findRev('.'); if(extn != -1 && (inc_file.right(inc_file.length()-extn) == Option::cpp_ext.first() || inc_file.right(inc_file.length()-extn) == Option::h_ext.first())) { @@ -513,7 +513,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons TQStringList ll = project->variables()["LEXSOURCES"]; for(TQStringList::Iterator it = ll.begin(); it != ll.end(); ++it) { TQString s = (*it), d; - int slsh = s.tqfindRev(Option::dir_sep); + int slsh = s.findRev(Option::dir_sep); if(slsh != -1) { d = s.left(slsh + 1); s = s.right(s.length() - slsh - 1); @@ -536,7 +536,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons TQStringList yl = project->variables()["YACCSOURCES"]; for(TQStringList::Iterator it = yl.begin(); it != yl.end(); ++it) { TQString s = (*it), d; - int slsh = s.tqfindRev(Option::dir_sep); + int slsh = s.findRev(Option::dir_sep); if(slsh != -1) { d = s.left(slsh + 1); s = s.right(s.length() - slsh - 1); @@ -560,13 +560,13 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons TQStringList &l = project->variables()[tqmocs[tqmoc]]; for(TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { TQString file = Option::fixPathToTargetOS((*it)); - if(file.section(Option::dir_sep, -(inc.tqcontains('/')+1)) == inc) { + if(file.section(Option::dir_sep, -(inc.contains('/')+1)) == inc) { fqn = (*it); if(tqmocs[tqmoc] == "_HDRTQMOC") { //Since it is include, no need to link it in as well project->variables()["_SRCTQMOC"].append((*it)); l.remove(it); - } else if(!tqfindMocSource(fqn).endsWith(fileFixify(fn))) { + } else if(!findMocSource(fqn).endsWith(fileFixify(fn))) { /* Not really a very good test, but this will at least avoid confusion if it really does happen (since tmake/qmake previously didn't even allow this the test is mostly accurate) */ @@ -580,7 +580,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons } } } - fqn = tqfindDependency(inc); //all else fails.. + fqn = findDependency(inc); //all else fails.. cache_fqn: if(from_source_dir) { fqn = fileFixify(fqn); @@ -596,7 +596,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons if(from_source_dir) fqn = fileFixify(fqn); debug_msg(4, "Resolved dependency of %s to %s", inc.latin1(), fqn.latin1()); - if(outdeps && outdeps->tqfindIndex(fqn) == -1) + if(outdeps && outdeps->findIndex(fqn) == -1) outdeps->append(fqn); } //read past new line now.. @@ -607,9 +607,9 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons if(recurse) { for(TQStringList::Iterator fnit = fndeps.begin(); fnit != fndeps.end(); ++fnit) { generateDependencies(dirs, (*fnit), recurse); - TQStringList &deplist = tqfindDependencies((*fnit)); + TQStringList &deplist = findDependencies((*fnit)); for(TQStringList::Iterator it = deplist.begin(); it != deplist.end(); ++it) - if(fndeps.tqfindIndex((*it)) == -1 && (*it) != fn) + if(fndeps.findIndex((*it)) == -1 && (*it) != fn) fndeps.append((*it)); } } @@ -624,9 +624,9 @@ MakefileGenerator::initOutPaths() return; init_opath_already = TRUE; TQMap<TQString, TQStringList> &v = project->variables(); - if(!v.tqcontains("TQMAKE_ABSOLUTE_SOURCE_PATH")) { + if(!v.contains("TQMAKE_ABSOLUTE_SOURCE_PATH")) { if(Option::mkfile::do_cache && !Option::mkfile::cachefile.isEmpty() && - v.tqcontains("TQMAKE_ABSOLUTE_SOURCE_ROOT")) { + v.contains("TQMAKE_ABSOLUTE_SOURCE_ROOT")) { TQString root = v["TQMAKE_ABSOLUTE_SOURCE_ROOT"].first(); root = Option::fixPathToTargetOS( root ); if(!root.isEmpty()) { @@ -746,7 +746,7 @@ MakefileGenerator::init() TQString cache_file(".qmake.internal.cache"); if(!project->isEmpty("TQMAKE_INTERNAL_CACHE_FILE")) cache_file = Option::fixPathToLocalOS(project->first("TQMAKE_INTERNAL_CACHE_FILE")); - if(cache_file.tqfind(TQDir::separator()) == -1) //guess they know what they are doing.. + if(cache_file.find(TQDir::separator()) == -1) //guess they know what they are doing.. cache_file.prepend(Option::output_dir + TQDir::separator()); if((Option::qmake_mode == Option::TQMAKE_GENERATE_PROJECT || Option::mkfile::do_deps || Option::mkfile::do_tqmocs) && !noIO()) { @@ -759,8 +759,8 @@ MakefileGenerator::init() incDirs += v["INCLUDEPATH"]; for(TQStringList::Iterator it = incDirs.begin(); it != incDirs.end(); ++it) { TQString r = (*it), l = Option::fixPathToLocalOS((*it)); - deplist.append(new MakefileDependDir(r.tqreplace("\"",""), - l.tqreplace("\"",""))); + deplist.append(new MakefileDependDir(r.replace("\"",""), + l.replace("\"",""))); } debug_msg(1, "Dependency Directories: %s", incDirs.join(" :: ").latin1()); if(Option::output.name() != "-" && project->isActiveConfig("qmake_cache")) { @@ -773,7 +773,7 @@ MakefileGenerator::init() enum { CacheInfo, CacheDepend, CacheMoc } state = CacheInfo; while (!cachet.eof()) { line = cachet.readLine().stripWhiteSpace(); - int sep = line.tqfind('='); + int sep = line.find('='); if(line == "[depend]") { state = CacheDepend; } else if(line == "[tqmocable]") { @@ -819,7 +819,7 @@ MakefileGenerator::init() if(found) { debug_msg(2, "Dependencies (cached): %s -> %s", file.latin1(), files.join(" :: ").latin1()); - tqfindDependencies(file) = files; + findDependencies(file) = files; setProcessedDependencies(file, TRUE); } } @@ -827,7 +827,7 @@ MakefileGenerator::init() void *found = cache_found_files[file]; if(found != (void *)2) { if(found) { - cache_found_files.tqreplace(file, (void *)2); + cache_found_files.replace(file, (void *)2); } else { TQFileInfo fi(fileFixify(file, TQDir::currentDirPath(), Option::output_dir)); if(fi.exists() && fi.lastModified() < cachefi.lastModified()) { @@ -837,7 +837,7 @@ MakefileGenerator::init() } } if(found && line != "*qmake_ignore*") { - int ext_len = file.length() - file.tqfindRev('.'); + int ext_len = file.length() - file.findRev('.'); bool cpp_ext = FALSE; for(TQStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) { @@ -846,7 +846,7 @@ MakefileGenerator::init() } if(cpp_ext) { project->variables()["_SRCTQMOC"].append(line); - } else if(project->variables()["HEADERS"].tqfindIndex(file) != -1) { + } else if(project->variables()["HEADERS"].findIndex(file) != -1) { for(TQStringList::Iterator hit = Option::h_ext.begin(); hit != Option::h_ext.end(); ++hit) { if((file.right(ext_len) == (*hit))) { @@ -903,8 +903,8 @@ MakefileGenerator::init() } if(!found) { TQString dir, regex = (*val_it), real_dir; - if(regex.tqfindRev(Option::dir_sep) != -1) { - dir = regex.left(regex.tqfindRev(Option::dir_sep) + 1); + if(regex.findRev(Option::dir_sep) != -1) { + dir = regex.left(regex.findRev(Option::dir_sep) + 1); real_dir = fileFixify(Option::fixPathToLocalOS(dir), TQDir::currentDirPath(), Option::output_dir); regex = regex.right(regex.length() - dir.length()); @@ -912,10 +912,10 @@ MakefileGenerator::init() if(real_dir.isEmpty() || TQFile::exists(real_dir)) { TQDir d(real_dir, regex); if(!d.count()) { - debug_msg(1, "%s:%d Failure to tqfind %s in vpath (%s)", + debug_msg(1, "%s:%d Failure to find %s in vpath (%s)", __FILE__, __LINE__, (*val_it).latin1(), vpath.join("::").latin1()); - warn_msg(WarnLogic, "Failure to tqfind: %s", (*val_it).latin1()); + warn_msg(WarnLogic, "Failure to find: %s", (*val_it).latin1()); continue; } else { for(int i = 0; i < (int)d.count(); i++) { @@ -931,7 +931,7 @@ MakefileGenerator::init() __FILE__, __LINE__, real_dir.latin1(), TQDir::separator(), regex.latin1(), real_dir.latin1()); - warn_msg(WarnLogic, "Failure to tqfind: %s", (*val_it).latin1()); + warn_msg(WarnLogic, "Failure to find: %s", (*val_it).latin1()); } } } @@ -955,13 +955,13 @@ MakefileGenerator::init() tqmoc_*.cpp files */ if(found_cache_tqmoc) { TQString fixed_file(fileFixify((*val_it), TQDir::currentDirPath(), Option::output_dir)); - TQString tqmoc = tqfindMocDestination(fixed_file); + TQString tqmoc = findMocDestination(fixed_file); if(!tqmoc.isEmpty()) { for(TQStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) { if(fixed_file.endsWith((*cppit))) { - TQStringList &deps = tqfindDependencies(fixed_file); - if(!deps.tqcontains(tqmoc)) + TQStringList &deps = findDependencies(fixed_file); + if(!deps.contains(tqmoc)) deps.append(tqmoc); break; } @@ -1034,10 +1034,10 @@ MakefileGenerator::init() if( ! project->isActiveConfig("lex_included")) { v["SOURCES"].append(impl); // attribute deps of lex file to impl file - TQStringList &lexdeps = tqfindDependencies((*it)); - TQStringList &impldeps = tqfindDependencies(impl); + TQStringList &lexdeps = findDependencies((*it)); + TQStringList &impldeps = findDependencies(impl); for(TQStringList::ConstIterator d = lexdeps.begin(); d != lexdeps.end(); ++d) { - if(!impldeps.tqcontains(*d)) + if(!impldeps.contains(*d)) impldeps.append(*d); } lexdeps.clear(); @@ -1066,12 +1066,12 @@ MakefileGenerator::init() decls.append(decl); impls.append(impl); v["SOURCES"].append(impl); - TQStringList &impldeps = tqfindDependencies(impl); + TQStringList &impldeps = findDependencies(impl); impldeps.append(decl); // attribute deps of yacc file to impl file - TQStringList &yaccdeps = tqfindDependencies((*it)); + TQStringList &yaccdeps = findDependencies((*it)); for(TQStringList::ConstIterator d = yaccdeps.begin(); d != yaccdeps.end(); ++d) { - if(!impldeps.tqcontains(*d)) + if(!impldeps.contains(*d)) impldeps.append(*d); } if( project->isActiveConfig("lex_included")) { @@ -1079,10 +1079,10 @@ MakefileGenerator::init() TQString lexsrc = fi.baseName(TRUE) + Option::lex_ext; if(fi.dirPath() != ".") lexsrc.prepend(fi.dirPath() + Option::dir_sep); - if(v["LEXSOURCES"].tqfindIndex(lexsrc) != -1) { + if(v["LEXSOURCES"].findIndex(lexsrc) != -1) { TQString trg = dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first(); impldeps.append(trg); - impldeps += tqfindDependencies(lexsrc); + impldeps += findDependencies(lexsrc); depends[lexsrc].clear(); } } @@ -1109,7 +1109,7 @@ MakefileGenerator::init() if( d == ".") d = TQDir::currentDirPath(); d = fileFixify(d, TQDir::currentDirPath(), Option::output_dir); - if(!includepath.tqcontains(d)) + if(!includepath.contains(d)) includepath.append(d); } else { if(decl.isEmpty() && !project->isEmpty("UI_HEADERS_DIR")) @@ -1120,7 +1120,7 @@ MakefileGenerator::init() if( d == ".") d = TQDir::currentDirPath(); d = fileFixify(d, TQDir::currentDirPath(), Option::output_dir); - if(!includepath.tqcontains(d)) + if(!includepath.contains(d)) includepath.append(d); } if(impl.isEmpty() && !project->isEmpty("UI_SOURCES_DIR")) @@ -1139,9 +1139,9 @@ MakefileGenerator::init() if(Option::output_dir != TQDir::currentDirPath() && project->isEmpty("UI_DIR") && project->isEmpty("UI_HEADERS_DIR")) { TQString decl_fixed = fileFixify(decl, TQDir::currentDirPath(), Option::output_dir); - if(!includepath.tqcontains(decl_fixed)) + if(!includepath.contains(decl_fixed)) includepath.append(decl_fixed); - if(!includepath.tqcontains(decl)) + if(!includepath.contains(decl)) project->variables()["INCLUDEPATH"].append(decl); } decl = fileFixify(decl, TQDir::currentDirPath(), Option::output_dir); @@ -1152,7 +1152,7 @@ MakefileGenerator::init() logicWarn(decl, "HEADERS"); decls.append(decl); impls.append(impl); - tqfindDependencies(impl).append(decl); + findDependencies(impl).append(decl); TQString tqmocable = Option::h_tqmoc_mod + fi.baseName(TRUE) + Option::h_tqmoc_ext; if(!v["TQMOC_DIR"].isEmpty()) @@ -1182,8 +1182,8 @@ MakefileGenerator::init() TQString imgfile = project->first("TQMAKE_IMAGE_COLLECTION"); Option::fixPathToTargetOS(imgfile); if(!project->isEmpty("UI_DIR") || !project->isEmpty("UI_SOURCES_DIR")) { - if(imgfile.tqfind(Option::dir_sep) != -1) - imgfile = imgfile.right(imgfile.tqfindRev(Option::dir_sep) + 1); + if(imgfile.find(Option::dir_sep) != -1) + imgfile = imgfile.right(imgfile.findRev(Option::dir_sep) + 1); imgfile.prepend( (project->isEmpty("UI_DIR") ? project->first("UI_SOURCES_DIR") : project->first("UI_DIR")) ); v["TQMAKE_IMAGE_COLLECTION"] = TQStringList(imgfile); @@ -1196,7 +1196,7 @@ MakefileGenerator::init() warn_msg(WarnLogic, "Failure to open: %s", (*it).latin1()); continue; } - tqfindDependencies(imgfile).append(fileFixify((*it))); + findDependencies(imgfile).append(fileFixify((*it))); } } v["OBJECTS"] += (v["IMAGEOBJECTS"] = createObjectList("TQMAKE_IMAGE_COLLECTION")); @@ -1242,15 +1242,15 @@ MakefileGenerator::init() bool MakefileGenerator::processPrlFile(TQString &file) { - bool ret = FALSE, try_tqreplace_file=FALSE; + bool ret = FALSE, try_replace_file=FALSE; TQString meta_file, orig_file = file; if(TQMakeMetaInfo::libExists(file)) { - try_tqreplace_file = TRUE; + try_replace_file = TRUE; meta_file = file; file = ""; } else { TQString tmp = file; - int ext = tmp.tqfindRev('.'); + int ext = tmp.findRev('.'); if(ext != -1) tmp = tmp.left(ext); meta_file = tmp; @@ -1259,7 +1259,7 @@ MakefileGenerator::processPrlFile(TQString &file) if(!TQMakeMetaInfo::libExists(fileFixify(meta_file, TQDir::currentDirPath(), Option::output_dir)) && project->isActiveConfig("qt")) { TQString stem = meta_file, dir, extn; - int slsh = stem.tqfindRev('/'), hadlib = 0; + int slsh = stem.findRev('/'), hadlib = 0; if(slsh != -1) { dir = stem.left(slsh + 1); stem = stem.right(stem.length() - slsh - 1); @@ -1268,7 +1268,7 @@ MakefileGenerator::processPrlFile(TQString &file) hadlib = 1; stem = stem.right(stem.length() - 3); } - int dot = stem.tqfind('.'); + int dot = stem.find('.'); if(dot != -1) { extn = stem.right(stem.length() - dot); stem = stem.left(dot); @@ -1282,11 +1282,11 @@ MakefileGenerator::processPrlFile(TQString &file) if(hadlib) meta_file += "lib"; meta_file += stem + extn; - try_tqreplace_file = TRUE; + try_replace_file = TRUE; } } TQString real_meta_file = Option::fixPathToLocalOS(meta_file); - if(project->variables()["TQMAKE_PRL_INTERNAL_FILES"].tqfindIndex(TQMakeMetaInfo::tqfindLib(meta_file)) != -1) { + if(project->variables()["TQMAKE_PRL_INTERNAL_FILES"].findIndex(TQMakeMetaInfo::findLib(meta_file)) != -1) { ret = TRUE; } else if(!meta_file.isEmpty()) { TQString f = fileFixify(real_meta_file, TQDir::currentDirPath(), Option::output_dir); @@ -1302,9 +1302,9 @@ MakefileGenerator::processPrlFile(TQString &file) TQMap<TQString, TQStringList> &vars = libinfo.variables(); for( TQMap<TQString, TQStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) processPrlVariable(it.key(), it.data()); - if(try_tqreplace_file && !libinfo.isEmpty("TQMAKE_PRL_TARGET")) { + if(try_replace_file && !libinfo.isEmpty("TQMAKE_PRL_TARGET")) { TQString dir; - int slsh = real_meta_file.tqfindRev(Option::dir_sep); + int slsh = real_meta_file.findRev(Option::dir_sep); if(slsh != -1) dir = real_meta_file.left(slsh+1); file = libinfo.first("TQMAKE_PRL_TARGET"); @@ -1314,12 +1314,12 @@ MakefileGenerator::processPrlFile(TQString &file) } } if(ret) { - TQString mf = TQMakeMetaInfo::tqfindLib(meta_file); + TQString mf = TQMakeMetaInfo::findLib(meta_file); project->variables()["TQMAKE_PRL_INTERNAL_FILES"].append(mf); project->variables()["TQMAKE_INTERNAL_INCLUDED_FILES"].append(mf); } } - if(try_tqreplace_file && file.isEmpty()) { + if(try_replace_file && file.isEmpty()) { #if 0 warn_msg(WarnLogic, "Found prl [%s] file with no target [%s]!", meta_file.latin1(), orig_file.latin1()); @@ -1338,14 +1338,14 @@ MakefileGenerator::processPrlVariable(const TQString &var, const TQStringList &l where = project->first("TQMAKE_INTERNAL_PRL_LIBS"); TQStringList &out = project->variables()[where]; for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { - if( out.tqfindIndex((*it)) == -1) + if( out.findIndex((*it)) == -1) out.append((*it)); } } else if(var == "TQMAKE_PRL_DEFINES") { TQStringList &out = project->variables()["DEFINES"]; for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { - if(out.tqfindIndex((*it)) == -1 && - project->variables()["PRL_EXPORT_DEFINES"].tqfindIndex((*it)) == -1) + if(out.findIndex((*it)) == -1 && + project->variables()["PRL_EXPORT_DEFINES"].findIndex((*it)) == -1) out.append((*it)); } } @@ -1382,7 +1382,7 @@ void MakefileGenerator::writePrlFile(TQTextStream &t) { TQString target = project->first("TARGET"); - int slsh = target.tqfindRev(Option::dir_sep); + int slsh = target.findRev(Option::dir_sep); if(slsh != -1) target = target.right(target.length() - slsh - 1); TQString bdir = Option::output_dir; @@ -1424,17 +1424,17 @@ MakefileGenerator::write() { usePlatformDir(); init(); - tqfindLibraries(); + findLibraries(); if((Option::qmake_mode == Option::TQMAKE_GENERATE_MAKEFILE || //write prl Option::qmake_mode == Option::TQMAKE_GENERATE_PRL) && project->variables()["TQMAKE_FAILED_RETQUIREMENTS"].isEmpty() && project->isActiveConfig("create_prl") && project->first("TEMPLATE") == "lib" && !project->isActiveConfig("plugin")) { TQString prl = var("TARGET"); - int slsh = prl.tqfindRev(Option::dir_sep); + int slsh = prl.findRev(Option::dir_sep); if(slsh != -1) prl = prl.right(prl.length() - slsh); - int dot = prl.tqfind('.'); + int dot = prl.find('.'); if(dot != -1) prl = prl.left(dot); prl += Option::prl_ext; @@ -1490,7 +1490,7 @@ MakefileGenerator::usePlatformDir() + (filePath.isEmpty() ? pltDir : slashPltDir)); filePath = project->first("TQMAKE_LIBS_QT"); - int fpi = filePath.tqfindRev(sep); + int fpi = filePath.findRev(sep); if (fpi == -1) project->variables()["TQMAKE_LIBS_QT"].prepend(pltDir + sep); else @@ -1499,7 +1499,7 @@ MakefileGenerator::usePlatformDir() + filePath.mid(fpi)); filePath = project->first("TQMAKE_LIBS_TQT_THREAD"); - fpi = filePath.tqfindRev(sep); + fpi = filePath.findRev(sep); if (fpi == -1) project->variables()["TQMAKE_LIBS_TQT_THREAD"].prepend(pltDir + sep); else @@ -1508,7 +1508,7 @@ MakefileGenerator::usePlatformDir() + filePath.mid(fpi)); filePath = project->first("TQMAKE_LIBS_TQT_ENTRY"); - fpi = filePath.tqfindRev(sep); + fpi = filePath.findRev(sep); if (fpi == -1) project->variables()["TQMAKE_LIBS_TQT_ENTRY"].prepend(pltDir + sep); else @@ -1533,7 +1533,7 @@ MakefileGenerator::writeObj(TQTextStream &t, const TQString &obj, const TQString if(!doDepends()) { TQString sdep, odep = (*sit) + " "; - TQStringList deps = tqfindDependencies((*sit)); + TQStringList deps = findDependencies((*sit)); for(TQStringList::Iterator dit = deps.begin(); dit != deps.end(); dit++) { if((*dit).endsWith(Option::cpp_tqmoc_ext)) odep += (*dit) + " "; @@ -1543,7 +1543,7 @@ MakefileGenerator::writeObj(TQTextStream &t, const TQString &obj, const TQString t << (*sit) << ": " << sdep << endl << (*oit) << ": " << odep ; } else { - t << (*oit) << ": " << (*sit) << " " << tqfindDependencies((*sit)).join(" \\\n\t\t"); + t << (*oit) << ": " << (*sit) << " " << findDependencies((*sit)).join(" \\\n\t\t"); } TQString comp, cimp; @@ -1563,15 +1563,15 @@ MakefileGenerator::writeObj(TQTextStream &t, const TQString &obj, const TQString if(!project->isEmpty("OBJECTS_DIR")) { use_implicit_rule = FALSE; } else { - int dot = (*sit).tqfindRev('.'); + int dot = (*sit).findRev('.'); if(dot == -1 || ((*sit).left(dot) + Option::obj_ext != (*oit))) use_implicit_rule = FALSE; } } if (!use_implicit_rule && !project->isEmpty(comp)) { TQString p = var(comp), srcf(*sit); - p.tqreplace(stringSrc, srcf); - p.tqreplace(stringObj, (*oit)); + p.replace(stringSrc, srcf); + p.replace(stringObj, (*oit)); t << "\n\t" << p; } t << endl << endl; @@ -1587,11 +1587,11 @@ MakefileGenerator::writeUicSrc(TQTextStream &t, const TQString &ui) TQString decl, impl; { TQString tmp = (*it), impl_dir, decl_dir; - decl = tmp.tqreplace(TQRegExp("\\" + Option::ui_ext + "$"), Option::h_ext.first()); - int dlen = decl.tqfindRev(Option::dir_sep) + 1; + decl = tmp.replace(TQRegExp("\\" + Option::ui_ext + "$"), Option::h_ext.first()); + int dlen = decl.findRev(Option::dir_sep) + 1; tmp = (*it); - impl = tmp.tqreplace(TQRegExp("\\" + Option::ui_ext + "$"), Option::cpp_ext.first()); - int ilen = decl.tqfindRev(Option::dir_sep) + 1; + impl = tmp.replace(TQRegExp("\\" + Option::ui_ext + "$"), Option::cpp_ext.first()); + int ilen = decl.findRev(Option::dir_sep) + 1; if(!project->isEmpty("UI_DIR")) { impl_dir = project->first("UI_DIR"); decl = project->first("UI_DIR") + decl.right(decl.length() - dlen); @@ -1619,14 +1619,14 @@ MakefileGenerator::writeUicSrc(TQTextStream &t, const TQString &ui) createDir(impl_dir); createDir(decl_dir); } - TQStringList deps = tqfindDependencies((*it)); + TQStringList deps = findDependencies((*it)); deps.remove(decl); //avoid circular dependencies.. t << decl << ": " << (*it) << " "; t << deps.join(" \\\n\t\t") << "\n\t" << "$(UIC) " << (*it) << " -o " << decl << endl << endl; TQString mildDecl = decl; - int k = mildDecl.tqfindRev(Option::dir_sep); + int k = mildDecl.findRev(Option::dir_sep); if ( k != -1 ) mildDecl = mildDecl.mid( k + 1 ); t << impl << ": " << decl << " " << (*it) << " "; @@ -1646,24 +1646,24 @@ MakefileGenerator::writeMocObj(TQTextStream &t, const TQString &obj, const TQStr TQStringList::Iterator oit = objl.begin(), sit = srcl.begin(); TQString stringSrc("$src"), stringObj("$obj"); for( ;sit != srcl.end() && oit != objl.end(); oit++, sit++) { - TQString hdr = tqfindMocSource((*sit)); + TQString hdr = findMocSource((*sit)); t << (*oit) << ": " - << (*sit) << " " << tqfindDependencies((*sit)).join(" \\\n\t\t") << " " - << hdr << " " << tqfindDependencies(hdr).join(" \\\n\t\t"); + << (*sit) << " " << findDependencies((*sit)).join(" \\\n\t\t") << " " + << hdr << " " << findDependencies(hdr).join(" \\\n\t\t"); bool use_implicit_rule = !project->isEmpty("TQMAKE_RUN_CXX_IMP"); if(use_implicit_rule) { if(!project->isEmpty("OBJECTS_DIR") || !project->isEmpty("TQMOC_DIR")) { use_implicit_rule = FALSE; } else { - int dot = (*sit).tqfindRev('.'); + int dot = (*sit).findRev('.'); if(dot == -1 || ((*sit).left(dot) + Option::obj_ext != (*oit))) use_implicit_rule = FALSE; } } if (!use_implicit_rule && !project->isEmpty("TQMAKE_RUN_CXX")) { TQString p = var("TQMAKE_RUN_CXX"), srcf(*sit); - p.tqreplace(stringSrc, srcf); - p.tqreplace(stringObj, (*oit)); + p.replace(stringSrc, srcf); + p.replace(stringObj, (*oit)); t << "\n\t" << p; } t << endl << endl; @@ -1676,7 +1676,7 @@ MakefileGenerator::writeMocSrc(TQTextStream &t, const TQString &src) { TQStringList &l = project->variables()[src]; for(TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { - TQString m = Option::fixPathToTargetOS(tqfindMocDestination(*it)); + TQString m = Option::fixPathToTargetOS(findMocDestination(*it)); if ( !m.isEmpty()) { TQString deps; if(!project->isActiveConfig("no_tqmocdepend")) @@ -1718,14 +1718,14 @@ MakefileGenerator::writeYaccSrc(TQTextStream &t, const TQString &src) if(!project->isActiveConfig("yacc_no_name_mangle")) { mangle = fi.baseName(TRUE); if(!project->isEmpty("TQMAKE_YACCFLAGS_MANGLE")) - yaccflags += " " + var("TQMAKE_YACCFLAGS_MANGLE").tqreplace(stringBase, mangle); + yaccflags += " " + var("TQMAKE_YACCFLAGS_MANGLE").replace(stringBase, mangle); else yaccflags += " -p " + mangle; } TQString out_h = default_out_h, out_c = default_out_c; if(!mangle.isEmpty()) { - out_h.tqreplace(stringBase, mangle); - out_c.tqreplace(stringBase, mangle); + out_h.replace(stringBase, mangle); + out_c.replace(stringBase, mangle); } t << impl << ": " << (*it) << "\n\t" @@ -1765,9 +1765,9 @@ MakefileGenerator::writeLexSrc(TQTextStream &t, const TQString &src) } TQString out_c = default_out_c; if(!stub.isEmpty()) - out_c.tqreplace(stringBase, stub); + out_c.replace(stringBase, stub); - t << impl << ": " << (*it) << " " << tqfindDependencies((*it)).join(" \\\n\t\t") << "\n\t" + t << impl << ": " << (*it) << " " << findDependencies((*it)).join(" \\\n\t\t") << "\n\t" << ( "$(LEX) " + lexflags + " " ) << (*it) << "\n\t" << "-$(DEL_FILE) " << impl << " " << "\n\t" << "-$(MOVE) " << out_c << " " << impl << endl << endl; @@ -1790,15 +1790,15 @@ MakefileGenerator::writeImageObj(TQTextStream &t, const TQString &obj) if(!project->isEmpty("OBJECTS_DIR") || !project->isEmpty("UI_DIR") || !project->isEmpty("UI_SOURCES_DIR")) { use_implicit_rule = FALSE; } else { - int dot = src.tqfindRev('.'); + int dot = src.findRev('.'); if(dot == -1 || (src.left(dot) + Option::obj_ext != (*oit))) use_implicit_rule = FALSE; } } if(!use_implicit_rule && !project->isEmpty("TQMAKE_RUN_CXX")) { TQString p = var("TQMAKE_RUN_CXX"), srcf(src); - p.tqreplace(stringSrc, srcf); - p.tqreplace(stringObj, (*oit)); + p.replace(stringSrc, srcf); + p.replace(stringObj, (*oit)); t << "\n\t" << p; } t << endl << endl; @@ -1813,17 +1813,17 @@ MakefileGenerator::writeImageSrc(TQTextStream &t, const TQString &src) for(TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { TQString gen = project->first("MAKEFILE_GENERATOR"); if ( gen == "MSVC" ) { - t << (*it) << ": " << tqfindDependencies((*it)).join(" \\\n\t\t") << "\n\t" + t << (*it) << ": " << findDependencies((*it)).join(" \\\n\t\t") << "\n\t" << "$(UIC) -o " << (*it) << " -embed " << project->first("TQMAKE_ORIG_TARGET") - << " -f <<\n" << tqfindDependencies((*it)).join(" ") << "\n<<" << endl << endl; + << " -f <<\n" << findDependencies((*it)).join(" ") << "\n<<" << endl << endl; } else if ( gen == "BMAKE" ) { - t << (*it) << ": " << tqfindDependencies((*it)).join(" \\\n\t\t") << "\n\t" + t << (*it) << ": " << findDependencies((*it)).join(" \\\n\t\t") << "\n\t" << "$(UIC) " << " -embed " << project->first("TQMAKE_ORIG_TARGET") - << " -f &&|\n" << tqfindDependencies((*it)).join(" ") << "\n| -o " << (*it) << endl << endl; + << " -f &&|\n" << findDependencies((*it)).join(" ") << "\n| -o " << (*it) << endl << endl; } else { - t << (*it) << ": " << tqfindDependencies((*it)).join(" \\\n\t\t") << "\n\t" + t << (*it) << ": " << findDependencies((*it)).join(" \\\n\t\t") << "\n\t" << "$(UIC) " << " -embed " << project->first("TQMAKE_ORIG_TARGET") - << " " << tqfindDependencies((*it)).join(" ") << " -o " << (*it) << endl << endl; + << " " << findDependencies((*it)).join(" ") << " -o " << (*it) << endl << endl; } } } @@ -1836,7 +1836,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) TQStringList &l = project->variables()[installs]; for(TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { TQString pvar = (*it) + ".path"; - if(project->variables()[(*it) + ".CONFIG"].tqfindIndex("no_path") == -1 && + if(project->variables()[(*it) + ".CONFIG"].findIndex("no_path") == -1 && project->variables()[pvar].isEmpty()) { warn_msg(WarnLogic, "%s is not defined: install target not created\n", pvar.latin1()); continue; @@ -1867,7 +1867,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) for(TQStringList::Iterator wild_it = tmp.begin(); wild_it != tmp.end(); ++wild_it) { TQString wild = Option::fixPathToLocalOS((*wild_it), FALSE), wild_var = fileFixify(wild); TQString dirstr = TQDir::currentDirPath(), filestr = wild; - int slsh = filestr.tqfindRev(Option::dir_sep); + int slsh = filestr.findRev(Option::dir_sep); if(slsh != -1) { dirstr = filestr.left(slsh+1); filestr = filestr.right(filestr.length() - slsh - 1); @@ -1967,7 +1967,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) } t << endl; - if(project->variables()[(*it) + ".CONFIG"].tqfindIndex("no_default_install") == -1) { + if(project->variables()[(*it) + ".CONFIG"].findIndex("no_default_install") == -1) { all_installs += TQString("install_") + (*it) + " "; if(!uninst.isEmpty()) all_uninstalls += "uninstall_" + (*it) + " "; @@ -2037,7 +2037,7 @@ MakefileGenerator::createObjectList(const TQString &var) TQFileInfo fi(Option::fixPathToLocalOS((*it))); if(objdir.isEmpty() && project->isActiveConfig("object_with_source")) { TQString fName = Option::fixPathToTargetOS((*it), FALSE); - int dl = fName.tqfindRev(Option::dir_sep); + int dl = fName.findRev(Option::dir_sep); if(dl != -1) dir = fName.left(dl + 1); } else { @@ -2218,7 +2218,7 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d, if(!in_d.isEmpty() || !out_d.isEmpty() || force_fix || !canon) key.prepend(in_d + "--" + out_d + "--" + TQString::number((int)force_fix) + "--" + TQString::number((int)canon) + "-"); - if(fileFixed.tqcontains(key)) + if(fileFixed.contains(key)) return fileFixed[key]; TQString file = file0; @@ -2294,7 +2294,7 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d, file = file.right(file.length() - (match_dir.length() + 1)); } else { for(int i = 1; i <= depth; i++) { - int sl = match_dir.tqfindRev(Option::dir_sep); + int sl = match_dir.findRev(Option::dir_sep); if(sl == -1) break; match_dir = match_dir.left(sl); @@ -2337,13 +2337,13 @@ void MakefileGenerator::logicWarn(const TQString &f, const TQString &w) if(!(Option::warn_level & WarnLogic)) return; TQString file = f; - int slsh = f.tqfindRev(Option::dir_sep); + int slsh = f.findRev(Option::dir_sep); if(slsh != -1) file = file.right(file.length() - slsh - 1); TQStringList &l = project->variables()[w]; for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) { TQString file2((*val_it)); - slsh = file2.tqfindRev(Option::dir_sep); + slsh = file2.findRev(Option::dir_sep); if(slsh != -1) file2 = file2.right(file2.length() - slsh - 1); if(file2 == file) { @@ -2359,8 +2359,8 @@ MakefileGenerator::dependencyKey(const TQString &file) const { TQString key = file; Option::fixPathToTargetOS(key); - if(key.tqfind(Option::dir_sep)) - key = key.right(key.length() - key.tqfindRev(Option::dir_sep) - 1); + if(key.find(Option::dir_sep)) + key = key.right(key.length() - key.findRev(Option::dir_sep) - 1); return key; } @@ -2374,13 +2374,13 @@ bool MakefileGenerator::processedDependencies(const TQString &file) { TQString key = dependencyKey(file); - if(!depProcessed.tqcontains(key)) + if(!depProcessed.contains(key)) return FALSE; return depProcessed[key]; } TQStringList -&MakefileGenerator::tqfindDependencies(const TQString &file) +&MakefileGenerator::findDependencies(const TQString &file) { return depends[dependencyKey(file)]; } @@ -2401,9 +2401,9 @@ MakefileGenerator::specdir() TQFileInfo fi(spec); TQString absSpec(fi.absFilePath()); absSpec = Option::fixPathToTargetOS(absSpec); - //tqreplace what you can + //replace what you can if(absSpec.startsWith(qdir)) { - absSpec.tqreplace(0, qdir.length(), "$(TQTDIR)"); + absSpec.replace(0, qdir.length(), "$(TQTDIR)"); spec = absSpec; } } @@ -2436,7 +2436,7 @@ MakefileGenerator::openOutput(TQFile &file) const file.setName(Option::output_dir + file.name()); //pwd when qmake was run if(project->isEmpty("TQMAKE_MAKEFILE")) project->variables()["TQMAKE_MAKEFILE"].append(file.name()); - int slsh = file.name().tqfindRev(Option::dir_sep); + int slsh = file.name().findRev(Option::dir_sep); if(slsh != -1) createDir(file.name().left(slsh)); if(file.open(IO_WriteOnly | IO_Translate)) { @@ -2478,13 +2478,13 @@ MakefileGenerator::create(TQMakeProject *proj) mkfile = new UnixMakefileGenerator(proj); } else if(gen == "MSVC") { // Visual Studio =< v6.0 - if(proj->first("TEMPLATE").tqfind(TQRegExp("^vc.*")) != -1) + if(proj->first("TEMPLATE").find(TQRegExp("^vc.*")) != -1) mkfile = new DspMakefileGenerator(proj); else mkfile = new NmakeMakefileGenerator(proj); } else if(gen == "MSVC.NET") { // Visual Studio >= v7.0 - if(proj->first("TEMPLATE").tqfind(TQRegExp("^vc.*")) != -1) + if(proj->first("TEMPLATE").find(TQRegExp("^vc.*")) != -1) mkfile = new VcprojGenerator(proj); else mkfile = new NmakeMakefileGenerator(proj); |