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/projectgenerator.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/projectgenerator.cpp')
-rw-r--r-- | tqtinterface/qt4/qmake/generators/projectgenerator.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tqtinterface/qt4/qmake/generators/projectgenerator.cpp b/tqtinterface/qt4/qmake/generators/projectgenerator.cpp index c608057..b52383e 100644 --- a/tqtinterface/qt4/qmake/generators/projectgenerator.cpp +++ b/tqtinterface/qt4/qmake/generators/projectgenerator.cpp @@ -87,7 +87,7 @@ ProjectGenerator::init() TQString builtin_regex = project_builtin_regx(); TQStringList dirs = Option::projfile::project_dirs; if(Option::projfile::do_pwd) { - if(!v["INCLUDEPATH"].tqcontains(".")) + if(!v["INCLUDEPATH"].contains(".")) v["INCLUDEPATH"] += "."; dirs.prepend(TQDir::currentDirPath()); } @@ -113,7 +113,7 @@ ProjectGenerator::init() regex = builtin_regex; } else { TQString file = (*pd); - int s = file.tqfindRev(Option::dir_sep); + int s = file.findRev(Option::dir_sep); if(s != -1) dir = file.left(s+1); if(addFile(file)) { @@ -125,7 +125,7 @@ ProjectGenerator::init() regex = (*pd); } if(!regex.isEmpty()) { - int s = regex.tqfindRev(Option::dir_sep); + int s = regex.findRev(Option::dir_sep); if(s != -1) { dir = regex.left(s+1); regex = regex.right(regex.length() - (s+1)); @@ -147,7 +147,7 @@ ProjectGenerator::init() } } } - if(add_depend && !dir.isEmpty() && !v["DEPENDPATH"].tqcontains(dir)) { + if(add_depend && !dir.isEmpty() && !v["DEPENDPATH"].contains(dir)) { TQFileInfo fi(dir); if(fi.absFilePath() != TQDir::currentDirPath()) v["DEPENDPATH"] += fileFixify(dir); @@ -167,7 +167,7 @@ ProjectGenerator::init() newdir = fileFixify(newdir); TQStringList &subdirs = v["SUBDIRS"]; if(TQFile::exists(fi.filePath() + TQDir::separator() + fi.fileName() + ".pro") && - !subdirs.tqcontains(newdir)) { + !subdirs.contains(newdir)) { subdirs.append(newdir); } else { TQDir d(newdir, "*.pro"); @@ -180,7 +180,7 @@ ProjectGenerator::init() nd += TQDir::separator(); nd += d[i]; fileFixify(nd); - if(d[i] != "." && d[i] != ".." && !subdirs.tqcontains(nd) && !out_file.endsWith(nd)) + if(d[i] != "." && d[i] != ".." && !subdirs.contains(nd) && !out_file.endsWith(nd)) subdirs.append(nd); } } @@ -189,14 +189,14 @@ ProjectGenerator::init() d.setFilter(TQDir::Dirs); for(int i = 0; i < (int)d.count(); i++) { TQString nd = fileFixify(newdir + TQDir::separator() + d[i]); - if(d[i] != "." && d[i] != ".." && !dirs.tqcontains(nd)) + if(d[i] != "." && d[i] != ".." && !dirs.contains(nd)) dirs.append(nd); } } } } else { //regexp TQString regx = (*pd), dir; - int s = regx.tqfindRev(Option::dir_sep); + int s = regx.findRev(Option::dir_sep); if(s != -1) { dir = regx.left(s+1); regx = regx.right(regx.length() - (s+1)); @@ -210,7 +210,7 @@ ProjectGenerator::init() if(fi.fileName() != "." && fi.fileName() != "..") { newdir = fileFixify(newdir); if(TQFile::exists(fi.filePath() + TQDir::separator() + fi.fileName() + ".pro") && - !subdirs.tqcontains(newdir)) { + !subdirs.contains(newdir)) { subdirs.append(newdir); } else { TQDir d(newdir, "*.pro"); @@ -218,13 +218,13 @@ ProjectGenerator::init() for(int i = 0; i < (int)d.count(); i++) { TQString nd = newdir + TQDir::separator() + d[i]; fileFixify(nd); - if(d[i] != "." && d[i] != ".." && !subdirs.tqcontains(nd)) { + if(d[i] != "." && d[i] != ".." && !subdirs.contains(nd)) { if(newdir + d[i] != Option::output_dir + Option::output.name()) subdirs.append(nd); } } } - if(Option::projfile::do_recursive && !dirs.tqcontains(newdir)) + if(Option::projfile::do_recursive && !dirs.contains(newdir)) dirs.append(newdir); } } @@ -250,18 +250,18 @@ ProjectGenerator::init() TQStringList &l = v[srcs[i]]; for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) { if(generateDependencies(deplist, (*val_it), TRUE)) { - TQStringList &tmp = tqfindDependencies((*val_it)); + TQStringList &tmp = findDependencies((*val_it)); if(!tmp.isEmpty()) { for(TQStringList::Iterator dep_it = tmp.begin(); dep_it != tmp.end(); ++dep_it) { TQString file_dir = (*dep_it).section(Option::dir_sep, 0, -2), file_no_path = (*dep_it).section(Option::dir_sep, -1); if(!file_dir.isEmpty()) { for(MakefileDependDir *mdd = deplist.first(); mdd; mdd = deplist.next()) { - if(mdd->local_dir == file_dir && !v["INCLUDEPATH"].tqcontains(mdd->real_dir)) + if(mdd->local_dir == file_dir && !v["INCLUDEPATH"].contains(mdd->real_dir)) v["INCLUDEPATH"] += mdd->real_dir; } } - if(no_qt_files && file_no_path.tqfind(TQRegExp("^q[a-z_0-9].h$")) != -1) + if(no_qt_files && file_no_path.find(TQRegExp("^q[a-z_0-9].h$")) != -1) no_qt_files = FALSE; TQString h_ext; for(TQStringList::Iterator hit = Option::h_ext.begin(); @@ -299,8 +299,8 @@ ProjectGenerator::init() file_no_path.startsWith(Option::lex_mod)) { addConfig("lex_included"); } - if(!h.tqcontains((*dep_it))) { - if(generateMocList((*dep_it)) && !tqfindMocDestination((*dep_it)).isEmpty()) + if(!h.contains((*dep_it))) { + if(generateMocList((*dep_it)) && !findMocDestination((*dep_it)).isEmpty()) h += (*dep_it); } } @@ -311,7 +311,7 @@ ProjectGenerator::init() if(h.isEmpty()) addConfig("tqmoc", FALSE); - //if we tqfind a file that matches an forms it needn't be included in the project + //if we find a file that matches an forms it needn't be included in the project TQStringList &u = v["INTERFACES"]; TQString no_ui[] = { "SOURCES", "HEADERS", TQString::null }; { @@ -320,10 +320,10 @@ ProjectGenerator::init() for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ) { bool found = FALSE; for(TQStringList::Iterator ui_it = u.begin(); ui_it != u.end(); ++ui_it) { - TQString s1 = (*val_it).right((*val_it).length() - ((*val_it).tqfindRev(Option::dir_sep) + 1)); - if(s1.tqfindRev('.') != -1) - s1 = s1.left(s1.tqfindRev('.')) + Option::ui_ext; - TQString u1 = (*ui_it).right((*ui_it).length() - ((*ui_it).tqfindRev(Option::dir_sep) + 1)); + TQString s1 = (*val_it).right((*val_it).length() - ((*val_it).findRev(Option::dir_sep) + 1)); + if(s1.findRev('.') != -1) + s1 = s1.left(s1.findRev('.')) + Option::ui_ext; + TQString u1 = (*ui_it).right((*ui_it).length() - ((*ui_it).findRev(Option::dir_sep) + 1)); if(s1 == u1) { found = TRUE; break; @@ -380,7 +380,7 @@ ProjectGenerator::addConfig(const TQString &cfg, bool add) TQString where = "CONFIG"; if(!add) where = "CONFIG_REMOVE"; - if(!project->variables()[where].tqcontains(cfg)) { + if(!project->variables()[where].contains(cfg)) { project->variables()[where] += cfg; return TRUE; } @@ -393,7 +393,7 @@ ProjectGenerator::addFile(TQString file) { file = fileFixify(file, TQDir::currentDirPath()); TQString dir; - int s = file.tqfindRev(Option::dir_sep); + int s = file.findRev(Option::dir_sep); if(s != -1) dir = file.left(s+1); if(file.mid(dir.length(), Option::h_tqmoc_mod.length()) == Option::h_tqmoc_mod) @@ -431,7 +431,7 @@ ProjectGenerator::addFile(TQString file) } TQString newfile = fileFixify(file); - if(!where.isEmpty() && !project->variables()[where].tqcontains(file)) { + if(!where.isEmpty() && !project->variables()[where].contains(file)) { project->variables()[where] += newfile; return TRUE; } @@ -464,7 +464,7 @@ ProjectGenerator::getWritableVar(const TQString &v, bool fixPath) // ### Commented out for now so that project generation works. // Sam: it had to do with trailing \'s (ie considered continuation lines) if(fixPath) - join = join.tqreplace("\\", "/"); + join = join.replace("\\", "/"); #else TQ_UNUSED(fixPath); #endif @@ -482,7 +482,7 @@ ProjectGenerator::openOutput(TQFile &file) const } if(!outdir.isEmpty() || file.name().isEmpty()) { TQString dir = TQDir::currentDirPath(); - int s = dir.tqfindRev('/'); + int s = dir.findRev('/'); if(s != -1) dir = dir.right(dir.length() - (s + 1)); file.setName(outdir + dir + ".pro"); |