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/mac | |
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/mac')
3 files changed, 59 insertions, 59 deletions
diff --git a/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp b/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp index 8e3ec21..e749a0d 100644 --- a/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp +++ b/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp @@ -93,13 +93,13 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) if((*val_it).startsWith("-L")) { TQString dir((*val_it).right((*val_it).length() - 2)); fixEnvVariables(dir); - if(project->variables()["DEPENDPATH"].tqfindIndex(dir) == -1 && - project->variables()["INCLUDEPATH"].tqfindIndex(dir) == -1) + if(project->variables()["DEPENDPATH"].findIndex(dir) == -1 && + project->variables()["INCLUDEPATH"].findIndex(dir) == -1) project->variables()["INCLUDEPATH"].append(dir); } else if((*val_it).startsWith("-l")) { TQString lib("lib" + (*val_it).right((*val_it).length() - 2) + "." + project->first("TQMAKE_EXTENSION_SHLIB")); - if(project->variables()["LIBRARIES"].tqfindIndex(lib) == -1) + if(project->variables()["LIBRARIES"].findIndex(lib) == -1) project->variables()["LIBRARIES"].append(lib); } else if((*val_it) == "-framework") { @@ -107,23 +107,23 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) if(val_it == extra_objs.end()) break; TQString frmwrk = (*val_it) + ".framework"; - if(project->variables()["FRAMEWORKS"].tqfindIndex(frmwrk) == -1) + if(project->variables()["FRAMEWORKS"].findIndex(frmwrk) == -1) project->variables()["FRAMEWORKS"].append(frmwrk); } else if((*val_it).left(1) != "-") { TQString lib=(*val_it); - int s = lib.tqfindRev('/'); + int s = lib.findRev('/'); if(s != -1) { TQString dir = lib.left(s); lib = lib.right(lib.length() - s - 1); fixEnvVariables(dir); - if(project->variables()["DEPENDPATH"].tqfindIndex(dir) == -1 && - project->variables()["INCLUDEPATH"].tqfindIndex(dir) == -1) + if(project->variables()["DEPENDPATH"].findIndex(dir) == -1 && + project->variables()["INCLUDEPATH"].findIndex(dir) == -1) project->variables()["INCLUDEPATH"].append(dir); } project->variables()["LIBRARIES"].append(lib); } } - //let metrowerks tqfind the files & set the files to the type I expect + //let metrowerks find the files & set the files to the type I expect TQDict<void> seen(293); TQString paths[] = { TQString("SRCTQMOC"), TQString("FORMS"), TQString("UICDECLS"), TQString("UICIMPLS"), TQString("SOURCES"),TQString("HEADERS"), @@ -134,15 +134,15 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) //establish file types seen.insert((*val_it), (void *)1); createFork((*val_it)); //the file itself - TQStringList &d = tqfindDependencies((*val_it)); //depends + TQStringList &d = findDependencies((*val_it)); //depends for(TQStringList::Iterator dep_it = d.begin(); dep_it != d.end(); ++dep_it) { - if(!seen.tqfind((*dep_it))) { + if(!seen.find((*dep_it))) { seen.insert((*dep_it), (void *)1); createFork((*dep_it)); } } //now chop it - int s = (*val_it).tqfindRev('/'); + int s = (*val_it).findRev('/'); if(s != -1) { TQString dir = (*val_it).left(s); (*val_it) = (*val_it).right((*val_it).length() - s - 1); @@ -179,7 +179,7 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) project->variables()["CODEWARRIOR_PREFIX_HEADER"].append(pre_pref + "_prefix.h"); } - TQString xmlfile = tqfindTemplate(project->first("TQMAKE_XML_TEMPLATE")); + TQString xmlfile = findTemplate(project->first("TQMAKE_XML_TEMPLATE")); TQFile file(xmlfile); if(!file.open(IO_ReadOnly )) { fprintf(stderr, "Cannot open XML file: %s\n", @@ -193,8 +193,8 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) TQString line; while ( !xml.eof() ) { line = xml.readLine(); - while((rep = line.tqfind(TQRegExp("\\$\\$[!a-zA-Z0-9_-]*"))) != -1) { - TQString torep = line.mid(rep, line.tqfind(TQRegExp("[^\\$!a-zA-Z0-9_-]"), rep) - rep); + while((rep = line.find(TQRegExp("\\$\\$[!a-zA-Z0-9_-]*"))) != -1) { + TQString torep = line.mid(rep, line.find(TQRegExp("[^\\$!a-zA-Z0-9_-]"), rep) - rep); TQString variable = torep.right(torep.length()-2); t << line.left(rep); //output the left side @@ -202,7 +202,7 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) if(variable == "CODEWARRIOR_HEADERS" || variable == "CODEWARRIOR_SOURCES" || variable == "CODEWARRIOR_LIBRARIES" || variable == "CODEWARRIOR_TQPREPROCESS" || variable == "CODEWARRIOR_TQPREPROCESSOUT") { - TQString outcmd=variable.right(variable.length() - variable.tqfindRev('_') - 1); + TQString outcmd=variable.right(variable.length() - variable.findRev('_') - 1); TQStringList args; if(outcmd == "TQPREPROCESS") args << "UICS" << "TQMOCS"; @@ -249,8 +249,8 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) variable == "CODEWARRIOR_LIBRARIES_LINKORDER" || variable == "CODEWARRIOR_TQPREPROCESS_LINKORDER" || variable == "CODEWARRIOR_TQPREPROCESSOUT_LINKORDER") { - TQString outcmd=variable.mid(variable.tqfind('_')+1, - variable.tqfindRev('_')-(variable.tqfind('_')+1)); + TQString outcmd=variable.mid(variable.find('_')+1, + variable.findRev('_')-(variable.find('_')+1)); TQStringList args; if(outcmd == "TQPREPROCESS") args << "UICS" << "TQMOCS"; @@ -276,8 +276,8 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) variable == "CODEWARRIOR_LIBRARIES_GROUP" || variable == "CODEWARRIOR_TQPREPROCESS_GROUP" || variable == "CODEWARRIOR_TQPREPROCESSOUT_GROUP") { - TQString outcmd = variable.mid(variable.tqfind('_')+1, - variable.tqfindRev('_')-(variable.tqfind('_')+1)); + TQString outcmd = variable.mid(variable.find('_')+1, + variable.findRev('_')-(variable.find('_')+1)); TQStringList args; if(outcmd == "TQPREPROCESS") args << "UICS" << "TQMOCS"; @@ -315,7 +315,7 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) } } else if(variable == "CODEWARRIOR_DEPENDPATH" || variable == "CODEWARRIOR_INCLUDEPATH" || variable == "CODEWARRIOR_FRAMEWORKPATH") { - TQString arg=variable.right(variable.length()-variable.tqfind('_')-1); + TQString arg=variable.right(variable.length()-variable.find('_')-1); TQStringList list; if(arg == "INCLUDEPATH") { list = project->variables()[arg]; @@ -463,9 +463,9 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) TQTextStream tqmocs( TQT_TQIODEVICE(&tqmocfile) ); TQStringList &list = project->variables()["SRCTQMOC"]; for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) { - TQString src = tqfindMocSource((*it)); - if(src.tqfindRev('/') != -1) - src = src.right(src.length() - src.tqfindRev('/') - 1); + TQString src = findMocSource((*it)); + if(src.findRev('/') != -1) + src = src.right(src.length() - src.findRev('/') - 1); tqmocs << src << endl; } tqmocfile.close(); @@ -483,8 +483,8 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) TQStringList &list = project->variables()["FORMS"]; for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) { TQString ui = (*it); - if(ui.tqfindRev('/') != -1) - ui = ui.right(ui.length() - ui.tqfindRev('/') - 1); + if(ui.findRev('/') != -1) + ui = ui.right(ui.length() - ui.findRev('/') - 1); uics << ui << endl; } uicfile.close(); @@ -500,8 +500,8 @@ MetrowerksMakefileGenerator::writeMakeParts(TQTextStream &t) TQTextStream prefix( TQT_TQIODEVICE(&prefixfile) ); TQStringList &list = project->variables()["DEFINES"]; for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) { - if((*it).tqfind('=') != -1) { - int x = (*it).tqfind('='); + if((*it).find('=') != -1) { + int x = (*it).find('='); prefix << "#define " << (*it).left(x) << " " << (*it).right((*it).length() - x - 1) << endl; } else { prefix << "#define " << (*it) << endl; @@ -527,11 +527,11 @@ MetrowerksMakefileGenerator::init() TQStringList &configs = project->variables()["CONFIG"]; if(project->isActiveConfig("qt")) { - if(configs.tqfindIndex("tqmoc")) configs.append("tqmoc"); + if(configs.findIndex("tqmoc")) configs.append("tqmoc"); if ( !( (project->first("TARGET") == "qt") || (project->first("TARGET") == "qte") || (project->first("TARGET") == "qt-mt") ) ) project->variables()["TQMAKE_LIBS"] += project->variables()["TQMAKE_LIBS_QT"]; - if(configs.tqfindIndex("tqmoc")) + if(configs.findIndex("tqmoc")) configs.append("tqmoc"); if ( !project->isActiveConfig("debug") ) project->variables()["DEFINES"].append("TQT_NO_DEBUG"); @@ -607,7 +607,7 @@ MetrowerksMakefileGenerator::init() TQString -MetrowerksMakefileGenerator::tqfindTemplate(const TQString &file) +MetrowerksMakefileGenerator::findTemplate(const TQString &file) { TQString ret; if(!TQFile::exists(ret = file) && @@ -658,7 +658,7 @@ bool MetrowerksMakefileGenerator::fixifyToMacPath(TQString &p, TQString &v, bool ) { v = "Absolute"; - if(p.tqfind(':') != -1) //guess its macish already + if(p.find(':') != -1) //guess its macish already return TRUE; static TQString st_volume; @@ -691,7 +691,7 @@ MetrowerksMakefileGenerator::fixifyToMacPath(TQString &p, TQString &v, bool ) p += "/"; if(TQDir::isRelativePath(p)) { if(p.startsWith("{")) { - int eoc = p.tqfind('}'); + int eoc = p.find('}'); if(eoc == -1) return FALSE; volume = p.mid(1, eoc - 1); @@ -706,7 +706,7 @@ MetrowerksMakefileGenerator::fixifyToMacPath(TQString &p, TQString &v, bool ) p = TQDir::cleanDirPath(p); if(!volume.isEmpty()) v = volume; - p.tqreplace("/", ":"); + p.replace("/", ":"); if(p.right(1) != ":") p += ':'; return TRUE; @@ -728,15 +728,15 @@ MetrowerksMakefileGenerator::processPrlFiles() if(opt.startsWith("-L")) { TQString r = opt.right(opt.length() - 2), l = r; fixEnvVariables(l); - libdirs.append(new MakefileDependDir(r.tqreplace( "\"", ""), - l.tqreplace( "\"", ""))); + libdirs.append(new MakefileDependDir(r.replace( "\"", ""), + l.replace( "\"", ""))); } else if(opt.left(2) == "-l") { TQString lib = opt.right(opt.length() - 2), prl; for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) { prl = mdd->local_dir + Option::dir_sep + "lib" + lib; if(processPrlFile(prl)) { if(prl.startsWith(mdd->local_dir)) - prl.tqreplace(0, mdd->local_dir.length(), mdd->real_dir); + prl.replace(0, mdd->local_dir.length(), mdd->real_dir); TQRegExp reg("^.*lib(" + lib + "[^.]*)\\." + project->first("TQMAKE_EXTENSION_SHLIB") + "$"); if(reg.exactMatch(prl)) @@ -781,7 +781,7 @@ MetrowerksMakefileGenerator::processPrlVariable(const TQString &var, const TQStr bool append = TRUE; if((*it).startsWith("-")) { if((*it).startsWith("-l") || (*it).startsWith("-L")) { - append = out.tqfindIndex((*it)) == -1; + append = out.findIndex((*it)) == -1; } else if((*it).startsWith("-framework")) { ++it; for(TQStringList::ConstIterator outit = out.begin(); @@ -796,7 +796,7 @@ MetrowerksMakefileGenerator::processPrlVariable(const TQString &var, const TQStr } } } else if(TQFile::exists((*it))) { - append = out.tqfindIndex((*it)); + append = out.findIndex((*it)); } if(append) out.append((*it)); diff --git a/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.h b/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.h index bd28500..35d8765 100644 --- a/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.h +++ b/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.h @@ -52,7 +52,7 @@ class MetrowerksMakefileGenerator : public MakefileGenerator bool writeSubDirs(TQTextStream &); bool writeMakefile(TQTextStream &); - TQString tqfindTemplate(const TQString &file); + TQString findTemplate(const TQString &file); void init(); public: MetrowerksMakefileGenerator(TQMakeProject *p); diff --git a/tqtinterface/qt4/qmake/generators/mac/pbuilder_pbx.cpp b/tqtinterface/qt4/qmake/generators/mac/pbuilder_pbx.cpp index 7e072e2..ce1167f 100644 --- a/tqtinterface/qt4/qmake/generators/mac/pbuilder_pbx.cpp +++ b/tqtinterface/qt4/qmake/generators/mac/pbuilder_pbx.cpp @@ -143,23 +143,23 @@ ProjectBuilderMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct) TQString project_key = keyFor(pbxproj + "_PROJECTREF"); if(project->isActiveConfig("flat")) { TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, TRUE); - if(flat_file.tqfind(Option::dir_sep) != -1) { + if(flat_file.find(Option::dir_sep) != -1) { TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file); name = dirs.back(); } } else { TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, TRUE); - if(TQDir::isRelativePath(flat_file) && flat_file.tqfind(Option::dir_sep) != -1) { + if(TQDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) { TQString last_grp("TQMAKE_PBX_HEIR_GROUP"); TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file); name = dirs.back(); for(TQStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { TQString new_grp(last_grp + Option::dir_sep + (*dir_it)), new_grp_key(keyFor(new_grp)); if(dir_it == dirs.begin()) { - if(!groups.tqcontains(new_grp)) + if(!groups.contains(new_grp)) project->variables()["TQMAKE_PBX_GROUPS"].append(new_grp_key); } else { - if(!groups[last_grp].tqcontains(new_grp_key)) + if(!groups[last_grp].contains(new_grp_key)) groups[last_grp] += new_grp_key; } last_grp = new_grp; @@ -432,13 +432,13 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) TQString src_key = keyFor(file), name = file; if(project->isActiveConfig("flat")) { TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, TRUE); - if(flat_file.tqfind(Option::dir_sep) != -1) { + if(flat_file.find(Option::dir_sep) != -1) { TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file); name = dirs.back(); } } else { TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, TRUE); - if(TQDir::isRelativePath(flat_file) && flat_file.tqfind(Option::dir_sep) != -1) { + if(TQDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) { TQString last_grp("TQMAKE_PBX_" + src_group + "_HEIR_GROUP"); TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file); name = dirs.back(); @@ -446,10 +446,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) for(TQStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { TQString new_grp(last_grp + Option::dir_sep + (*dir_it)), new_grp_key(keyFor(new_grp)); if(dir_it == dirs.begin()) { - if(!src_list.tqcontains(new_grp_key)) + if(!src_list.contains(new_grp_key)) src_list.append(new_grp_key); } else { - if(!groups[last_grp].tqcontains(new_grp_key)) + if(!groups[last_grp].contains(new_grp_key)) groups[last_grp] += new_grp_key; } last_grp = new_grp; @@ -513,12 +513,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) } TQString src_group_key = keyFor(src_group); - if(root_group_list.tqfindIndex(src_group_key) == -1) + if(root_group_list.findIndex(src_group_key) == -1) root_group_list += src_group_key; TQStringList &group = groups[src_group]; for(TQStringList::Iterator src_it = src_list.begin(); src_it != src_list.end(); ++src_it) { - if(group.tqfindIndex((*src_it)) == -1) + if(group.findIndex((*src_it)) == -1) group += (*src_it); } } @@ -710,7 +710,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) } if(!library.isEmpty()) { if(name.isEmpty()) { - int slsh = library.tqfindRev(Option::dir_sep); + int slsh = library.findRev(Option::dir_sep); if(slsh != -1) name = library.right(library.length() - slsh - 1); } @@ -923,7 +923,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) else lib = project->first("TARGET_"); } - int slsh = lib.tqfindRev(Option::dir_sep); + int slsh = lib.findRev(Option::dir_sep); if(slsh != -1) lib = lib.right(lib.length() - slsh - 1); t << "\t\t\t" << "isa = PBXLibraryReference;" << "\n" @@ -994,8 +994,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) if(plist_in_file.open(IO_ReadOnly)) { TQTextStream plist_in(&plist_in_file); TQString plist_in_text = plist_in.read(); - plist_in_text = plist_in_text.tqreplace("@ICON@", (project->isEmpty("RC_FILE") ? TQString("") : project->first("RC_FILE").section(Option::dir_sep, -1))); - plist_in_text = plist_in_text.tqreplace("@EXECUTABLE@", project->first("TQMAKE_ORIG_TARGET")); + plist_in_text = plist_in_text.replace("@ICON@", (project->isEmpty("RC_FILE") ? TQString("") : project->first("RC_FILE").section(Option::dir_sep, -1))); + plist_in_text = plist_in_text.replace("@EXECUTABLE@", project->first("TQMAKE_ORIG_TARGET")); TQFile plist_out_file("Info.plist"); if(plist_out_file.open(IO_WriteOnly | IO_Translate)) { TQTextStream plist_out(&plist_out_file); @@ -1094,7 +1094,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) read_plist = true; TQTextStream stream(&plist); while(!stream.eof()) - t << stream.readLine().tqreplace('"', "\\\"") << endl; + t << stream.readLine().replace('"', "\\\"") << endl; } } if(!read_plist) { @@ -1255,7 +1255,7 @@ TQString ProjectBuilderMakefileGenerator::fixQuotes(const TQString &val) { TQString ret(val); - ret = ret.tqreplace(TQRegExp("('|\\\\|\")"), "\\\\1"); + ret = ret.replace(TQRegExp("('|\\\\|\")"), "\\\\1"); return ret; } @@ -1264,7 +1264,7 @@ ProjectBuilderMakefileGenerator::fixEnvs(const TQString &file) { TQRegExp reg_var("\\$\\((.*)\\)"); for(int rep = 0; (rep = reg_var.search(file, rep)) != -1; ) { - if(project->variables()["TQMAKE_PBX_VARS"].tqfindIndex(reg_var.cap(1)) == -1) + if(project->variables()["TQMAKE_PBX_VARS"].findIndex(reg_var.cap(1)) == -1) project->variables()["TQMAKE_PBX_VARS"].append(reg_var.cap(1)); rep += reg_var.matchedLength(); } @@ -1293,7 +1293,7 @@ ProjectBuilderMakefileGenerator::keyFor(const TQString &block) return block; #endif TQString ret; - if(!keys.tqcontains(block)) { + if(!keys.contains(block)) { ret = TQT_TQSTRING(qtMD5(block.utf8()).left(24)).upper(); keys.insert(block, ret); } else { @@ -1346,7 +1346,7 @@ ProjectBuilderMakefileGenerator::pbuilderVersion() const else version_plist = "/Developer/Applications/Project Builder.app/Contents/version.plist"; } else { - version_plist = version_plist.tqreplace(TQRegExp("\""), ""); + version_plist = version_plist.replace(TQRegExp("\""), ""); } TQFile version_file(version_plist); if (version_file.open(IO_ReadOnly)) { @@ -1371,7 +1371,7 @@ ProjectBuilderMakefileGenerator::pbuilderVersion() const } version_file.close(); } else { debug_msg(1, "pbuilder: version.plist: Failure to open %s", version_plist.latin1()); } - if(version.isEmpty() && version_plist.tqcontains("Xcode")) { + if(version.isEmpty() && version_plist.contains("Xcode")) { ret = "39"; } else { if(version.startsWith("2.")) |