diff options
Diffstat (limited to 'experimental/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/experimental/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp b/experimental/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp index 8e3ec2143..e749a0d24 100644 --- a/experimental/tqtinterface/qt4/qmake/generators/mac/metrowerks_xml.cpp +++ b/experimental/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)); |