diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
commit | eaa7ee2e0bbca40ba3173c4304f81957e8964291 (patch) | |
tree | 4f793aa48a5080aedc94ce6e519c3b86708f2b88 /tqtinterface/qt4/qmake/generators/win32/winmakefile.cpp | |
parent | 79a9d7a46a20d4a0923bc06fc471fdc2176ef865 (diff) | |
download | experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.tar.gz experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
Diffstat (limited to 'tqtinterface/qt4/qmake/generators/win32/winmakefile.cpp')
-rw-r--r-- | tqtinterface/qt4/qmake/generators/win32/winmakefile.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/tqtinterface/qt4/qmake/generators/win32/winmakefile.cpp b/tqtinterface/qt4/qmake/generators/win32/winmakefile.cpp index 1cf1cbe..30701bd 100644 --- a/tqtinterface/qt4/qmake/generators/win32/winmakefile.cpp +++ b/tqtinterface/qt4/qmake/generators/win32/winmakefile.cpp @@ -72,7 +72,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) subdirs.append(sd); sd->makefile = "$(MAKEFILE)"; if((*it).right(4) == ".pro") { - int slsh = file.tqfindRev(Option::dir_sep); + int slsh = file.findRev(Option::dir_sep); if(slsh != -1) { sd->directory = file.left(slsh+1); sd->profile = file.mid(slsh+1); @@ -86,15 +86,15 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) sd->directory = sd->directory.left(sd->directory.length() - 1); if(!sd->profile.isEmpty()) { TQString basename = sd->directory; - int new_slsh = basename.tqfindRev(Option::dir_sep); + int new_slsh = basename.findRev(Option::dir_sep); if(new_slsh != -1) basename = basename.mid(new_slsh+1); if(sd->profile != basename + ".pro") sd->makefile += "." + sd->profile.left(sd->profile.length() - 4); //no need for the .pro } sd->target = "sub-" + (*it); - sd->target.tqreplace('/', '-'); - sd->target.tqreplace('.', '_'); + sd->target.replace('/', '-'); + sd->target.replace('.', '_'); } } TQPtrListIterator<SubDir> it(subdirs); @@ -120,7 +120,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) t << "\n\t" << "$(TQMAKE) " << (*it)->profile << " " << buildArgs(); t << " -o " << (*it)->makefile; if(have_dir) { - int subLevels = it.current()->directory.tqcontains(Option::dir_sep) + 1; + int subLevels = it.current()->directory.contains(Option::dir_sep) + 1; t << "\n\t" << "@cd .."; for(int i = 1; i < subLevels; i++ ) t << Option::dir_sep << ".."; @@ -136,7 +136,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) t << "\n\t" << "$(MAKE)"; t << " -f " << (*it)->makefile; if(have_dir) { - int subLevels = it.current()->directory.tqcontains(Option::dir_sep) + 1; + int subLevels = it.current()->directory.contains(Option::dir_sep) + 1; t << "\n\t" << "@cd .."; for(int i = 1; i < subLevels; i++ ) t << Option::dir_sep << ".."; @@ -154,7 +154,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) t << endl; } - if(project->variables()["TQMAKE_INTERNAL_TQMAKE_DEPS"].tqfindIndex("qmake_all") == -1) + if(project->variables()["TQMAKE_INTERNAL_TQMAKE_DEPS"].findIndex("qmake_all") == -1) project->variables()["TQMAKE_INTERNAL_TQMAKE_DEPS"].append("qmake_all"); writeMakeQmake(t); @@ -164,11 +164,11 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) bool have_dir = !(*it)->directory.isEmpty(); TQString subdir = (*it)->directory; TQString profile = (*it)->profile; - int subLevels = subdir.tqcontains(Option::dir_sep) + 1; + int subLevels = subdir.contains(Option::dir_sep) + 1; t << "\n\t"; if(have_dir) t << "cd " << subdir << "\n\t"; - int lastSlash = subdir.tqfindRev(Option::dir_sep); + int lastSlash = subdir.findRev(Option::dir_sep); if(lastSlash != -1) subdir = subdir.mid( lastSlash + 1 ); t << "$(TQMAKE) " @@ -202,7 +202,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) t << varGlue("TQMAKE_CLEAN","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ", ""); if (!subdirs.isEmpty()) { for( it.toFirst(); it.current(); ++it) { - int subLevels = (*it)->directory.tqcontains(Option::dir_sep) + 1; + int subLevels = (*it)->directory.contains(Option::dir_sep) + 1; bool have_dir = !(*it)->directory.isEmpty(); if(have_dir) t << "\n\t" << "cd " << (*it)->directory; @@ -242,7 +242,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) deps += " " + dep; } if(!project->variables()["TQMAKE_NOFORCE"].isEmpty() && - project->variables()[(*sit) + ".CONFIG"].tqfindIndex("phony") != -1) + project->variables()[(*sit) + ".CONFIG"].findIndex("phony") != -1) deps += TQString(" ") + "FORCE"; t << targ << ":" << deps << "\n"; if(!cmd.isEmpty()) @@ -257,7 +257,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) int -Win32MakefileGenerator::tqfindHighestVersion(const TQString &d, const TQString &stem) +Win32MakefileGenerator::findHighestVersion(const TQString &d, const TQString &stem) { TQString bd = Option::fixPathToLocalOS(d, TRUE); if(!TQFile::exists(bd)) @@ -278,13 +278,13 @@ Win32MakefileGenerator::tqfindHighestVersion(const TQString &d, const TQString & TQMakeMetaInfo libinfo; if(libinfo.readLib(bd + dllStem)) { if(!libinfo.isEmpty("TQMAKE_PRL_VERSION")) - biggest = TQMAX(biggest, libinfo.first("TQMAKE_PRL_VERSION").tqreplace(".", "").toInt()); + biggest = TQMAX(biggest, libinfo.first("TQMAKE_PRL_VERSION").replace(".", "").toInt()); } return biggest; } TQString -Win32MakefileGenerator::tqfindDependency(const TQString &dep) +Win32MakefileGenerator::findDependency(const TQString &dep) { { TQStringList &qut = project->variables()["TQMAKE_EXTRA_WIN_TARGETS"]; @@ -309,19 +309,19 @@ Win32MakefileGenerator::tqfindDependency(const TQString &dep) for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) { TQString out = tmp_out; TQFileInfo fi(Option::fixPathToLocalOS((*input))); - out.tqreplace("${TQMAKE_FILE_BASE}", fi.baseName()); - out.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); + out.replace("${TQMAKE_FILE_BASE}", fi.baseName()); + out.replace("${TQMAKE_FILE_NAME}", fi.filePath()); if(out.endsWith(dep)) return out; } } } } - return MakefileGenerator::tqfindDependency(dep); + return MakefileGenerator::findDependency(dep); } bool -Win32MakefileGenerator::tqfindLibraries(const TQString &where) +Win32MakefileGenerator::findLibraries(const TQString &where) { TQStringList &l = project->variables()[where]; @@ -331,7 +331,7 @@ Win32MakefileGenerator::tqfindLibraries(const TQString &where) for(TQStringList::Iterator libpathit = libpaths.begin(); libpathit != libpaths.end(); ++libpathit) { TQString r = (*libpathit), l = r; fixEnvVariables(l); - dirs.append(new MakefileDependDir(r.tqreplace("\"",""), l.tqreplace("\"",""))); + dirs.append(new MakefileDependDir(r.replace("\"",""), l.replace("\"",""))); } } dirs.setAutoDelete(TRUE); @@ -345,19 +345,19 @@ Win32MakefileGenerator::tqfindLibraries(const TQString &where) } if(opt.startsWith("/LIBPATH:")) { TQString r = opt.mid(9), l = Option::fixPathToLocalOS(r); - dirs.append(new MakefileDependDir(r.tqreplace("\"",""), - l.tqreplace("\"",""))); + dirs.append(new MakefileDependDir(r.replace("\"",""), + l.replace("\"",""))); } else if(opt.startsWith("-L") || opt.startsWith("/L")) { TQString r = opt.mid(2), l = Option::fixPathToLocalOS(r); - dirs.append(new MakefileDependDir(r.tqreplace("\"",""), - l.tqreplace("\"",""))); + dirs.append(new MakefileDependDir(r.replace("\"",""), + l.replace("\"",""))); remove = TRUE; //we eat this switch } else if(opt.startsWith("-l") || opt.startsWith("/l")) { TQString lib = opt.right(opt.length() - 2), out; if(!lib.isEmpty()) { for(MakefileDependDir *mdd = dirs.first(); mdd; mdd = dirs.next() ) { TQString extension; - int ver = tqfindHighestVersion(mdd->local_dir, lib); + int ver = findHighestVersion(mdd->local_dir, lib); if(ver > 0) extension += TQString::number(ver); extension += ".lib"; @@ -369,7 +369,7 @@ Win32MakefileGenerator::tqfindLibraries(const TQString &where) } } if(out.isEmpty()) { - remove = TRUE; //just eat it since we cannot tqfind one.. + remove = TRUE; //just eat it since we cannot find one.. } else { modified_opt = TRUE; (*it) = out; @@ -377,11 +377,11 @@ Win32MakefileGenerator::tqfindLibraries(const TQString &where) } else if(!TQFile::exists(Option::fixPathToLocalOS(opt))) { TQPtrList<MakefileDependDir> lib_dirs; TQString file = opt; - int slsh = file.tqfindRev(Option::dir_sep); + int slsh = file.findRev(Option::dir_sep); if(slsh != -1) { TQString r = file.left(slsh+1), l = r; fixEnvVariables(l); - lib_dirs.append(new MakefileDependDir(r.tqreplace("\"",""), l.tqreplace("\"",""))); + lib_dirs.append(new MakefileDependDir(r.replace("\"",""), l.replace("\"",""))); file = file.right(file.length() - slsh - 1); } else { lib_dirs = dirs; @@ -393,7 +393,7 @@ Win32MakefileGenerator::tqfindLibraries(const TQString &where) if(!file.at(file.length()-1).isNumber()) { for(MakefileDependDir *mdd = lib_dirs.first(); mdd; mdd = lib_dirs.next() ) { TQString lib_tmpl(file + "%1" + ".lib"); - int ver = tqfindHighestVersion(mdd->local_dir, file); + int ver = findHighestVersion(mdd->local_dir, file); if(ver != -1) { if(ver) lib_tmpl = lib_tmpl.arg(ver); @@ -437,8 +437,8 @@ Win32MakefileGenerator::processPrlFiles() for(TQStringList::Iterator libpathit = libpaths.begin(); libpathit != libpaths.end(); ++libpathit) { TQString r = (*libpathit), l = r; fixEnvVariables(l); - libdirs.append(new MakefileDependDir(r.tqreplace("\"",""), - l.tqreplace("\"",""))); + libdirs.append(new MakefileDependDir(r.replace("\"",""), + l.replace("\"",""))); } } for(bool ret = FALSE; TRUE; ret = FALSE) { @@ -454,8 +454,8 @@ Win32MakefileGenerator::processPrlFiles() if(opt.startsWith("/LIBPATH:")) { TQString r = opt.mid(9), l = r; fixEnvVariables(l); - libdirs.append(new MakefileDependDir(r.tqreplace("\"",""), - l.tqreplace("\"",""))); + libdirs.append(new MakefileDependDir(r.replace("\"",""), + l.replace("\"",""))); } } else { if(!processed[opt]) { |