diff options
Diffstat (limited to 'qmake/generators')
| -rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 54 | ||||
| -rw-r--r-- | qmake/generators/mac/pbuilder_pbx.h | 4 | ||||
| -rw-r--r-- | qmake/generators/makefile.cpp | 206 | ||||
| -rw-r--r-- | qmake/generators/makefile.h | 6 | ||||
| -rw-r--r-- | qmake/generators/projectgenerator.cpp | 52 | ||||
| -rw-r--r-- | qmake/generators/projectgenerator.h | 4 | ||||
| -rw-r--r-- | qmake/generators/unix/unixmake.cpp | 44 | ||||
| -rw-r--r-- | qmake/generators/unix/unixmake.h | 2 | ||||
| -rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 46 | ||||
| -rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 32 | ||||
| -rw-r--r-- | qmake/generators/win32/msvc_dsp.cpp | 24 | ||||
| -rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 28 | ||||
| -rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 124 | ||||
| -rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 8 | ||||
| -rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 36 | ||||
| -rw-r--r-- | qmake/generators/win32/msvc_vcproj.h | 2 | ||||
| -rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 26 |
17 files changed, 349 insertions, 349 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 329b79967..efb20d6cd 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -64,7 +64,7 @@ ProjectBuilderMakefileGenerator::writeMakefile(TQTextStream &t) /* for now just dump, I need to generated an empty xml or something.. */ fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n", var("QMAKE_FAILED_REQUIREMENTS").latin1()); - return TRUE; + return true; } project->variables()["MAKEFILE"].clear(); @@ -72,8 +72,8 @@ ProjectBuilderMakefileGenerator::writeMakefile(TQTextStream &t) if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib") return writeMakeParts(t); else if(project->first("TEMPLATE") == "subdirs") - return writeSubdirs(t, FALSE); - return FALSE; + return writeSubdirs(t, false); + return false; } bool @@ -102,7 +102,7 @@ ProjectBuilderMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct) TQString oldpwd = TQDir::currentDirPath(); TQMap<TQString, TQStringList> groups; for(TQStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it) { - TQFileInfo fi(Option::fixPathToLocalOS((*it), TRUE)); + TQFileInfo fi(Option::fixPathToLocalOS((*it), true)); if(fi.exists()) { if(fi.isDir()) { TQString profile = (*it); @@ -138,17 +138,17 @@ ProjectBuilderMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct) project->variables()["QMAKE_PBX_SUBDIRS"] += pbxproj; //PROJECTREF { - bool in_root = TRUE; + bool in_root = true; TQString name = TQDir::currentDirPath(); TQString project_key = keyFor(pbxproj + "_PROJECTREF"); if(project->isActiveConfig("flat")) { - TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, TRUE); + TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, true); 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); + TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, true); if(TQDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) { TQString last_grp("QMAKE_PBX_HEIR_GROUP"); TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file); @@ -165,7 +165,7 @@ ProjectBuilderMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct) last_grp = new_grp; } groups[last_grp] += project_key; - in_root = FALSE; + in_root = false; } } if(in_root) @@ -328,7 +328,7 @@ nextfile: << "\t" << "rootObject = " << keyFor("QMAKE_PBX_ROOT") << ";" << "\n" << "}" << endl; - return TRUE; + return true; } bool @@ -336,7 +336,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) { int i; TQStringList tmp; - bool did_preprocess = FALSE; + bool did_preprocess = false; //HEADER const int pbVersion = pbuilderVersion(); @@ -411,14 +411,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) for(TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) { TQStringList files = (*it); - bool buildable = TRUE; + bool buildable = true; if(srcs[i] == "FORMS") { TQString form_dot_h = (*it) + Option::h_ext.first(); if(TQFile::exists(form_dot_h)) files += form_dot_h; - buildable = FALSE; + buildable = false; } else if(srcs[i] == "HEADERS" || srcs[i] == "QMAKE_INTERNAL_INCLUDED_FILES") { - buildable = FALSE; + buildable = false; } files = fileFixify(files); @@ -428,16 +428,16 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) file = file.mid(1, file.length()-2); if(file.endsWith(Option::cpp_moc_ext) || file.endsWith(Option::prl_ext)) continue; - bool in_root = TRUE; + bool in_root = true; TQString src_key = keyFor(file), name = file; if(project->isActiveConfig("flat")) { - TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, TRUE); + TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, true); 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); + TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, true); if(TQDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) { TQString last_grp("QMAKE_PBX_" + src_group + "_HEIR_GROUP"); TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file); @@ -455,7 +455,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) last_grp = new_grp; } groups[last_grp] += src_key; - in_root = FALSE; + in_root = false; } } if(in_root) @@ -540,7 +540,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) TQString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak"; TQFile mkf(mkfile); if(mkf.open(IO_WriteOnly | IO_Translate)) { - did_preprocess = TRUE; + did_preprocess = true; debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1()); TQTextStream mkt(&mkf); writeHeader(mkt); @@ -560,7 +560,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) TQStringList &yaccs = project->variables()["YACCSOURCES"]; for(TQStringList::Iterator yit = yaccs.begin(); yit != yaccs.end(); ++yit) { TQFileInfo fi((*yit)); - mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(TRUE) + mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(true) << Option::yacc_mod << Option::cpp_ext.first(); } } @@ -568,7 +568,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) TQStringList &lexs = project->variables()["LEXSOURCES"]; for(TQStringList::Iterator lit = lexs.begin(); lit != lexs.end(); ++lit) { TQFileInfo fi((*lit)); - mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(TRUE) + mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(true) << Option::lex_mod << Option::cpp_ext.first(); } } @@ -637,7 +637,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) for(i = 0; !libs[i].isNull(); i++) { tmp = project->variables()[libs[i]]; for(TQStringList::Iterator it = tmp.begin(); it != tmp.end();) { - bool remove = FALSE; + bool remove = false; TQString library, name, opt = (*it).stripWhiteSpace(); if(opt.length() >= 2 && (opt[0] == '"' || opt[0] == '\'') && opt[(int) opt.length()-1] == opt[0]) opt = opt.mid(1, opt.length()-2); @@ -647,7 +647,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) libdirs.append(r); } else if(opt == "-prebind") { project->variables()["QMAKE_DO_PREBINDING"].append("TRUE"); - remove = TRUE; + remove = true; } else if(opt.startsWith("-l")) { name = opt.right(opt.length() - 2); TQString lib("lib" + name); @@ -668,7 +668,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) library = (*lit) + Option::dir_sep + libinfo.first("QMAKE_PRL_TARGET"); debug_msg(1, "pbuilder: Found library (%s) via PRL %s (%s)", opt.latin1(), lib_file.latin1(), library.latin1()); - remove = TRUE; + remove = true; } } } @@ -681,7 +681,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) library = tmp; debug_msg(1, "pbuilder: Found library (%s) via %s", opt.latin1(), library.latin1()); - remove = TRUE; + remove = true; } } } @@ -697,14 +697,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) if(TQFile::exists((*fit) + TQDir::separator() + (*it) + ".framework")) { --it; it = tmp.remove(it); - remove = TRUE; + remove = true; library = (*fit) + Option::dir_sep + (*it) + ".framework"; break; } } } else if(opt.left(1) != "-") { if(TQFile::exists(opt)) { - remove = TRUE; + remove = true; library = opt; } } @@ -1248,7 +1248,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t) << pbx_dir << Option::dir_sep << "qt_preprocess.mak $@" << endl; } } - return TRUE; + return true; } TQString diff --git a/qmake/generators/mac/pbuilder_pbx.h b/qmake/generators/mac/pbuilder_pbx.h index a3f43eb8e..60c0be8b1 100644 --- a/qmake/generators/mac/pbuilder_pbx.h +++ b/qmake/generators/mac/pbuilder_pbx.h @@ -64,8 +64,8 @@ public: virtual bool openOutput(TQFile &) const; protected: - bool doPrecompiledHeaders() const { return FALSE; } - virtual bool doDepends() const { return FALSE; } //never necesary + bool doPrecompiledHeaders() const { return false; } + virtual bool doDepends() const { return false; } //never necesary }; inline ProjectBuilderMakefileGenerator::~ProjectBuilderMakefileGenerator() diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 9c49b2b15..f9b179f44 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -76,16 +76,16 @@ TQString mkdir_p_asstring(const TQString &dir) static bool createDir(const TQString& fullPath) { if(TQFile::exists(fullPath)) - return FALSE; + return false; TQDir dirTmp; - bool ret = TRUE; + bool ret = true; TQString pathComponent, tmpPath; - TQStringList hierarchy = TQStringList::split(TQString(Option::dir_sep), fullPath, TRUE); + TQStringList hierarchy = TQStringList::split(TQString(Option::dir_sep), fullPath, true); for(TQStringList::Iterator it = hierarchy.begin(); it != hierarchy.end(); ++it) { pathComponent = *it + TQDir::separator(); tmpPath += pathComponent; if(!dirTmp.mkdir(tmpPath)) { - ret = FALSE; + ret = false; // break; } } @@ -93,9 +93,9 @@ static bool createDir(const TQString& fullPath) } -MakefileGenerator::MakefileGenerator(TQMakeProject *p) : init_opath_already(FALSE), - init_already(FALSE), moc_aware(FALSE), - no_io(FALSE), project(p) +MakefileGenerator::MakefileGenerator(TQMakeProject *p) : init_opath_already(false), + init_already(false), moc_aware(false), + no_io(false), project(p) { } @@ -112,17 +112,17 @@ bool MakefileGenerator::generateMocList(const TQString &fn_target) { if(!findMocDestination(fn_target).isEmpty()) - return TRUE; + return true; TQString fn_local = Option::fixPathToLocalOS(fileFixify(fn_target, TQDir::currentDirPath(), Option::output_dir)); int file = open(fn_local.latin1(), O_RDONLY); if(file == -1) - return FALSE; + return false; struct stat fst; if(fstat(file, &fst) || S_ISDIR(fst.st_mode)) - return FALSE; //shouldn't happen + return false; //shouldn't happen char *big_buffer = gimme_buffer(fst.st_size); int total_size_read; @@ -132,7 +132,7 @@ MakefileGenerator::generateMocList(const TQString &fn_target) total_size_read += have_read); close(file); - bool ignore_qobject = FALSE; + bool ignore_qobject = false; int line_count = 1; /* qmake ignore TQ_OBJECT */ #define COMP_LEN 9 //strlen("TQ_OBJECT") @@ -154,7 +154,7 @@ MakefileGenerator::generateMocList(const TQString &fn_target) debug_msg(2, "Mocgen: %s:%d Found \"qmake ignore TQ_OBJECT\"", fn_target.latin1(), line_count); x += 20; - ignore_qobject = TRUE; + ignore_qobject = true; } } } else if(*(big_buffer + x) == '*') { @@ -179,14 +179,14 @@ MakefileGenerator::generateMocList(const TQString &fn_target) if(!strncmp(big_buffer+x, "TQ_OBJECT", OBJ_LEN)) { if(ignore_qobject) { debug_msg(2, "Mocgen: %s:%d Ignoring TQ_OBJECT", fn_target.latin1(), line_count); - interesting = FALSE; + interesting = false; } len=OBJ_LEN; } else if(!strncmp(big_buffer+x, "Q_DISPATCH", DIS_LEN)) { len=DIS_LEN; } if(SYMBOL_CHAR(*(big_buffer+x+len))) - interesting = FALSE; + interesting = false; if(interesting) { *(big_buffer+x+len) = '\0'; debug_msg(2, "Mocgen: %s:%d Found MOC symbol %s", fn_target.latin1(), @@ -201,7 +201,7 @@ MakefileGenerator::generateMocList(const TQString &fn_target) else if(dir_pos != -1) mocFile = fn_target.left(dir_pos+1); - bool cpp_ext = FALSE; + bool cpp_ext = false; for(TQStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) { if((cpp_ext = (fn_target.right(ext_len) == (*cppit)))) @@ -239,26 +239,26 @@ MakefileGenerator::generateMocList(const TQString &fn_target) } #undef OBJ_LEN #undef DIS_LEN - return TRUE; + return true; } bool MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, const TQString &f, bool recurse) { if(processedDependencies(f)) - return TRUE; - setProcessedDependencies(f, TRUE); + return true; + setProcessedDependencies(f, true); TQStringList &fndeps = findDependencies(f); TQString fn = fileFixify(f, TQDir::currentDirPath(), Option::output_dir); - fn = Option::fixPathToLocalOS(fn, FALSE); + fn = Option::fixPathToLocalOS(fn, false); TQString fix_env_fn = Option::fixPathToLocalOS(fn); int file = open(fix_env_fn.latin1(), O_RDONLY); if(file == -1) - return FALSE; + return false; struct stat fst; if(fstat(file, &fst) || S_ISDIR(fst.st_mode)) - return FALSE; //shouldn't happen + return false; //shouldn't happen TQString fndir, fix_env_fndir; int dl = fn.findRev(Option::dir_sep); @@ -394,7 +394,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons x++; } int val_len; - for(val_len = 0; TRUE; val_len++) { + for(val_len = 0; true; val_len++) { if(quote) { if(*(big_buffer+x+val_len) == quote) break; @@ -423,17 +423,17 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons } if(!inc.isEmpty()) { - bool from_source_dir = TRUE; + bool from_source_dir = true; debug_msg(5, "%s:%d Found dependency to %s", fix_env_fn.latin1(), line_count, inc.latin1()); if(!project->isEmpty("SKIP_DEPENDS")) { - bool found = FALSE; + bool found = false; TQStringList &nodeplist = project->values("SKIP_DEPENDS"); for(TQStringList::Iterator it = nodeplist.begin(); it != nodeplist.end(); ++it) { TQRegExp regx((*it)); if(regx.search(inc) != -1) { - found = TRUE; + found = true; break; } } @@ -472,7 +472,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons //and see if they go away.. if(depHeuristics.contains(inc)) { fqn = depHeuristics[inc]; - from_source_dir = FALSE; + 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); @@ -493,7 +493,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons if(!fqn.isEmpty() && !fqn.endsWith(Option::dir_sep)) fqn += Option::dir_sep; fqn += inc_file; - from_source_dir = FALSE; //uics go in the output_dir (so don't fix them) + from_source_dir = false; //uics go in the output_dir (so don't fix them) fqn = fileFixify(fqn, TQDir::currentDirPath(), Option::output_dir); goto cache_fqn; } @@ -515,7 +515,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons d = project->first("QMAKE_ABSOLUTE_SOURCE_PATH"); if(s == lhs) { fqn = d + inc; - from_source_dir = FALSE; //uics go in the output_dir (so don't fix them) + from_source_dir = false; //uics go in the output_dir (so don't fix them) fqn = fileFixify(fqn, TQDir::currentDirPath(), Option::output_dir); goto cache_fqn; } @@ -538,7 +538,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons d = project->first("QMAKE_ABSOLUTE_SOURCE_PATH"); if(s == lhs) { fqn = d + inc; - from_source_dir = FALSE; //uics go in the output_dir (so don't fix them) + from_source_dir = false; //uics go in the output_dir (so don't fix them) fqn = fileFixify(fqn, TQDir::currentDirPath(), Option::output_dir); goto cache_fqn; } @@ -567,7 +567,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons "Found potential multiple MOC include %s (%s) in '%s'", inc.latin1(), fqn.latin1(), fix_env_fn.latin1()); } - from_source_dir = FALSE; //mocs go in the output_dir (so don't fix them) + from_source_dir = false; //mocs go in the output_dir (so don't fix them) goto cache_fqn; } } @@ -577,7 +577,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons cache_fqn: if(from_source_dir) { fqn = fileFixify(fqn); - from_source_dir = FALSE; + from_source_dir = false; } depHeuristics.insert(inc, fqn); } @@ -585,7 +585,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons handle_fqn: if(fqn.isEmpty()) //I give up continue; - fqn = Option::fixPathToTargetOS(fqn, FALSE); + fqn = Option::fixPathToTargetOS(fqn, false); if(from_source_dir) fqn = fileFixify(fqn); debug_msg(4, "Resolved dependency of %s to %s", inc.latin1(), fqn.latin1()); @@ -607,7 +607,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons } } debug_msg(2, "Dependencies: %s -> %s", fn.latin1(), fndeps.join(" :: ").latin1()); - return TRUE; + return true; } void @@ -615,7 +615,7 @@ MakefileGenerator::initOutPaths() { if(init_opath_already) return; - init_opath_already = TRUE; + init_opath_already = true; TQMap<TQString, TQStringList> &v = project->variables(); if(!v.contains("QMAKE_ABSOLUTE_SOURCE_PATH")) { if(Option::mkfile::do_cache && !Option::mkfile::cachefile.isEmpty() && @@ -672,7 +672,7 @@ MakefileGenerator::initOutPaths() path = path.right(path.length() - 1); } #ifdef TQ_WS_WIN - bool driveExists = TRUE; + bool driveExists = true; if ( !TQDir::isRelativePath( path ) ) { if ( TQFile::exists( path.left( 3 ) ) ) { d.cd( path.left( 3 ) ); @@ -680,7 +680,7 @@ MakefileGenerator::initOutPaths() } else { warn_msg(WarnLogic, "%s: Cannot access drive '%s' (%s)", dirs[x].latin1(), path.left( 3 ).latin1(), path.latin1() ); - driveExists = FALSE; + driveExists = false; } } if ( driveExists ) { @@ -717,7 +717,7 @@ MakefileGenerator::init() initOutPaths(); if(init_already) return; - init_already = TRUE; + init_already = true; TQMap<TQString, TQStringList> &v = project->variables(); TQString paths[] = { TQString("SOURCES"), TQString("FORMS"), TQString("YACCSOURCES"), TQString("INCLUDEPATH"), @@ -744,7 +744,7 @@ MakefileGenerator::init() if((Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT || Option::mkfile::do_deps || Option::mkfile::do_mocs) && !noIO()) { TQPtrList<MakefileDependDir> deplist; - deplist.setAutoDelete(TRUE); + deplist.setAutoDelete(true); if((Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT || Option::mkfile::do_deps) && doDepends()) { TQStringList incDirs = v["DEPENDPATH"] + v["QMAKE_ABSOLUTE_SOURCE_PATH"]; @@ -792,7 +792,7 @@ MakefileGenerator::init() TQFileInfo fi(fileFixify(file, TQDir::currentDirPath(), Option::output_dir)); if(fi.exists() && fi.lastModified() < cachefi.lastModified()) { cache_found_files.insert(file, (void *)1); - found = TRUE; + found = true; } } if(found) { @@ -804,7 +804,7 @@ MakefileGenerator::init() fi.lastModified() < cachefi.lastModified()) { cache_found_files.insert((*dep_it), (void *)1); } else { - found = FALSE; + found = false; break; } } @@ -813,7 +813,7 @@ MakefileGenerator::init() debug_msg(2, "Dependencies (cached): %s -> %s", file.latin1(), files.join(" :: ").latin1()); findDependencies(file) = files; - setProcessedDependencies(file, TRUE); + setProcessedDependencies(file, true); } } } else { @@ -831,7 +831,7 @@ MakefileGenerator::init() } if(found && line != "*qmake_ignore*") { int ext_len = file.length() - file.findRev('.'); - bool cpp_ext = FALSE; + bool cpp_ext = false; for(TQStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) { if((cpp_ext = (file.right(ext_len) == (*cppit)))) @@ -865,7 +865,7 @@ MakefileGenerator::init() TQString("HEADERS"), TQString("SOURCES"), TQString("FORMS"), TQString("PRECOMPILED_HEADER"), TQString::null }; depHeuristics.clear(); - bool write_cache = FALSE, read_cache = TQFile::exists(cache_file); + bool write_cache = false, read_cache = TQFile::exists(cache_file); int x; for(x = 0; sources[x] != TQString::null; x++) { TQStringList vpath, &l = v[sources[x]]; @@ -873,7 +873,7 @@ MakefileGenerator::init() if(!(*val_it).isEmpty()) { TQString file = fileFixify((*val_it), TQDir::currentDirPath(), Option::output_dir); if(!TQFile::exists(file)) { - bool found = FALSE; + bool found = false; if(TQDir::isRelativePath((*val_it))) { if(vpath.isEmpty()) vpath = v["VPATH_" + sources[x]] + v["VPATH"] + @@ -887,7 +887,7 @@ MakefileGenerator::init() if(dir.right(Option::dir_sep.length()) != Option::dir_sep) dir += Option::dir_sep; (*val_it) = fileFixify(dir + (*val_it)); - found = TRUE; + found = true; debug_msg(1, "Found file through vpath %s -> %s", file.latin1(), (*val_it).latin1()); break; @@ -934,15 +934,15 @@ MakefileGenerator::init() for(x = 0; sources[x] != TQString::null; x++) { TQStringList &l = v[sources[x]]; for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) { - bool found_cache_moc = FALSE, found_cache_dep = FALSE; + bool found_cache_moc = false, found_cache_dep = false; if(read_cache && Option::output.name() != "-" && project->isActiveConfig("qmake_cache")) { if(processedDependencies((*val_it))) - found_cache_dep = TRUE; + found_cache_dep = true; if(cache_found_files[(*val_it)] == (void *)2) - found_cache_moc = TRUE; + found_cache_moc = true; if(!found_cache_moc || !found_cache_dep) - write_cache = TRUE; + write_cache = true; } /* Do moc before dependency checking since some includes can come from moc_*.cpp files */ @@ -1020,7 +1020,7 @@ MakefileGenerator::init() dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir); if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep) dir += Option::dir_sep; - TQString impl = dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first(); + TQString impl = dir + fi.baseName(true) + Option::lex_mod + Option::cpp_ext.first(); logicWarn(impl, "SOURCES"); logicWarn(impl, "SOURCES"); impls.append(impl); @@ -1051,9 +1051,9 @@ MakefileGenerator::init() dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir); if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep) dir += Option::dir_sep; - TQString impl = dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first(); + TQString impl = dir + fi.baseName(true) + Option::yacc_mod + Option::cpp_ext.first(); logicWarn(impl, "SOURCES"); - TQString decl = dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first(); + TQString decl = dir + fi.baseName(true) + Option::yacc_mod + Option::h_ext.first(); logicWarn(decl, "HEADERS"); decls.append(decl); @@ -1069,11 +1069,11 @@ MakefileGenerator::init() } if( project->isActiveConfig("lex_included")) { // is there a matching lex file ? Transfer its dependencies. - TQString lexsrc = fi.baseName(TRUE) + Option::lex_ext; + TQString lexsrc = fi.baseName(true) + Option::lex_ext; if(fi.dirPath() != ".") lexsrc.prepend(fi.dirPath() + Option::dir_sep); if(v["LEXSOURCES"].findIndex(lexsrc) != -1) { - TQString trg = dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first(); + TQString trg = dir + fi.baseName(true) + Option::lex_mod + Option::cpp_ext.first(); impldeps.append(trg); impldeps += findDependencies(lexsrc); depends[lexsrc].clear(); @@ -1128,7 +1128,7 @@ MakefileGenerator::init() impl = fileFixify(impl, TQDir::currentDirPath(), Option::output_dir); if(!impl.isEmpty() && !impl.endsWith(Option::dir_sep)) impl += Option::dir_sep; - impl += fi.baseName(TRUE) + Option::cpp_ext.first(); + impl += fi.baseName(true) + Option::cpp_ext.first(); 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); @@ -1140,14 +1140,14 @@ MakefileGenerator::init() decl = fileFixify(decl, TQDir::currentDirPath(), Option::output_dir); if(!decl.isEmpty() && !decl.endsWith(Option::dir_sep)) decl += Option::dir_sep; - decl += fi.baseName(TRUE) + Option::h_ext.first(); + decl += fi.baseName(true) + Option::h_ext.first(); logicWarn(impl, "SOURCES"); logicWarn(decl, "HEADERS"); decls.append(decl); impls.append(impl); findDependencies(impl).append(decl); - TQString mocable = Option::h_moc_mod + fi.baseName(TRUE) + Option::h_moc_ext; + TQString mocable = Option::h_moc_mod + fi.baseName(true) + Option::h_moc_ext; if(!v["MOC_DIR"].isEmpty()) mocable.prepend(v["MOC_DIR"].first()); else if(fi.dirPath() != ".") @@ -1209,7 +1209,7 @@ MakefileGenerator::init() l = v["_HDRMOC"] + v["_UIMOC"] + v["_SRCMOC"]; for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) { if(!(*val_it).isEmpty()) - (*val_it) = Option::fixPathToTargetOS((*val_it), FALSE); + (*val_it) = Option::fixPathToTargetOS((*val_it), false); } } @@ -1218,7 +1218,7 @@ MakefileGenerator::init() TQStringList &l = v[fixpaths[path]]; for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) { if(!(*val_it).isEmpty()) - (*val_it) = Option::fixPathToTargetOS((*val_it), FALSE); + (*val_it) = Option::fixPathToTargetOS((*val_it), false); } } @@ -1235,10 +1235,10 @@ MakefileGenerator::init() bool MakefileGenerator::processPrlFile(TQString &file) { - bool ret = FALSE, try_replace_file=FALSE; + bool ret = false, try_replace_file=false; TQString meta_file, orig_file = file; if(TQMakeMetaInfo::libExists(file)) { - try_replace_file = TRUE; + try_replace_file = true; meta_file = file; file = ""; } else { @@ -1275,12 +1275,12 @@ MakefileGenerator::processPrlFile(TQString &file) if(hadlib) meta_file += "lib"; meta_file += stem + extn; - try_replace_file = TRUE; + try_replace_file = true; } } TQString real_meta_file = Option::fixPathToLocalOS(meta_file); if(project->variables()["QMAKE_PRL_INTERNAL_FILES"].findIndex(TQMakeMetaInfo::findLib(meta_file)) != -1) { - ret = TRUE; + ret = true; } else if(!meta_file.isEmpty()) { TQString f = fileFixify(real_meta_file, TQDir::currentDirPath(), Option::output_dir); if(TQMakeMetaInfo::libExists(f)) { @@ -1291,7 +1291,7 @@ MakefileGenerator::processPrlFile(TQString &file) } else if(project->isActiveConfig("no_read_prl_" + libinfo.type().lower())) { debug_msg(2, "Ignored meta file %s [%s]", real_meta_file.latin1(), libinfo.type().latin1()); } else { - ret = TRUE; + ret = true; TQMap<TQString, TQStringList> &vars = libinfo.variables(); for( TQMap<TQString, TQStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) processPrlVariable(it.key(), it.data()); @@ -1348,7 +1348,7 @@ void MakefileGenerator::processPrlFiles() { TQDict<void> processed; - for(bool ret = FALSE; TRUE; ret = FALSE) { + for(bool ret = false; true; ret = false) { //read in any prl files included.. TQStringList l_out; TQString where = "QMAKE_LIBS"; @@ -1359,7 +1359,7 @@ MakefileGenerator::processPrlFiles() TQString file = (*it); if(!processed[file] && processPrlFile(file)) { processed.insert(file, (void*)1); - ret = TRUE; + ret = true; } if(!file.isEmpty()) l_out.append(file); @@ -1452,7 +1452,7 @@ MakefileGenerator::write() TQTextStream t(&Option::output); writeMakefile(t); } - return TRUE; + return true; } // Manipulate directories, so it's possible to build @@ -1554,11 +1554,11 @@ MakefileGenerator::writeObj(TQTextStream &t, const TQString &obj, const TQString bool use_implicit_rule = !project->isEmpty(cimp); if(use_implicit_rule) { if(!project->isEmpty("OBJECTS_DIR")) { - use_implicit_rule = FALSE; + use_implicit_rule = false; } else { int dot = (*sit).findRev('.'); if(dot == -1 || ((*sit).left(dot) + Option::obj_ext != (*oit))) - use_implicit_rule = FALSE; + use_implicit_rule = false; } } if (!use_implicit_rule && !project->isEmpty(comp)) { @@ -1646,11 +1646,11 @@ MakefileGenerator::writeMocObj(TQTextStream &t, const TQString &obj, const TQStr bool use_implicit_rule = !project->isEmpty("QMAKE_RUN_CXX_IMP"); if(use_implicit_rule) { if(!project->isEmpty("OBJECTS_DIR") || !project->isEmpty("MOC_DIR")) { - use_implicit_rule = FALSE; + use_implicit_rule = false; } else { int dot = (*sit).findRev('.'); if(dot == -1 || ((*sit).left(dot) + Option::obj_ext != (*oit))) - use_implicit_rule = FALSE; + use_implicit_rule = false; } } if (!use_implicit_rule && !project->isEmpty("QMAKE_RUN_CXX")) { @@ -1704,12 +1704,12 @@ MakefileGenerator::writeYaccSrc(TQTextStream &t, const TQString &src) if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep) dir += Option::dir_sep; - TQString impl = dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first(); - TQString decl = dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first(); + TQString impl = dir + fi.baseName(true) + Option::yacc_mod + Option::cpp_ext.first(); + TQString decl = dir + fi.baseName(true) + Option::yacc_mod + Option::h_ext.first(); TQString yaccflags = "$(YACCFLAGS)", mangle = "y"; if(!project->isActiveConfig("yacc_no_name_mangle")) { - mangle = fi.baseName(TRUE); + mangle = fi.baseName(true); if(!project->isEmpty("QMAKE_YACCFLAGS_MANGLE")) yaccflags += " " + var("QMAKE_YACCFLAGS_MANGLE").replace(stringBase, mangle); else @@ -1749,11 +1749,11 @@ MakefileGenerator::writeLexSrc(TQTextStream &t, const TQString &src) dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir); if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep) dir += Option::dir_sep; - TQString impl = dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first(); + TQString impl = dir + fi.baseName(true) + Option::lex_mod + Option::cpp_ext.first(); TQString lexflags = "$(LEXFLAGS)", stub="yy"; if(!project->isActiveConfig("yacc_no_name_mangle")) { - stub = fi.baseName(TRUE); + stub = fi.baseName(true); lexflags += " -P" + stub; } TQString out_c = default_out_c; @@ -1781,11 +1781,11 @@ MakefileGenerator::writeImageObj(TQTextStream &t, const TQString &obj) bool use_implicit_rule = !project->isEmpty("QMAKE_RUN_CXX_IMP"); if(use_implicit_rule) { if(!project->isEmpty("OBJECTS_DIR") || !project->isEmpty("UI_DIR") || !project->isEmpty("UI_SOURCES_DIR")) { - use_implicit_rule = FALSE; + use_implicit_rule = false; } else { int dot = src.findRev('.'); if(dot == -1 || (src.left(dot) + Option::obj_ext != (*oit))) - use_implicit_rule = FALSE; + use_implicit_rule = false; } } if(!use_implicit_rule && !project->isEmpty("QMAKE_RUN_CXX")) { @@ -1831,7 +1831,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) continue; } - bool do_default = TRUE; + bool do_default = true; const TQString root = "$(INSTALL_ROOT)"; TQString target, dst= fileFixify(project->variables()[pvar].first()); if(dst.right(1) != Option::dir_sep) @@ -1842,7 +1842,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) if(tmp.isEmpty()) tmp = project->variables()[(*it) + ".commands"]; //to allow compatible name if(!tmp.isEmpty()) { - do_default = FALSE; + do_default = false; if(!target.isEmpty()) target += "\n\t"; target += tmp.join(" "); @@ -1852,9 +1852,9 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) if(!tmp.isEmpty()) { if(!target.isEmpty()) target += "\n"; - do_default = FALSE; + do_default = false; 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 wild = Option::fixPathToLocalOS((*wild_it), false), wild_var = fileFixify(wild); TQString dirstr = TQDir::currentDirPath(), filestr = wild; int slsh = filestr.findRev(Option::dir_sep); if(slsh != -1) { @@ -1870,13 +1870,13 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) target += "\t"; TQString cmd = TQString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" + Option::fixPathToTargetOS(fileFixify(wild, TQString::null, - TQString::null, FALSE, FALSE), FALSE) + + TQString::null, false, false), false) + "\" \"" + root + dst + "\"\n"; target += cmd; if(!project->isActiveConfig("debug") && !fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP")) target += TQString("\t-") + var("QMAKE_STRIP") + " \"" + - root + fileFixify(dst + filestr, TQString::null, TQString::null, FALSE, FALSE) + + root + fileFixify(dst + filestr, TQString::null, TQString::null, false, false) + "\"\n"; if(!uninst.isEmpty()) uninst.append("\n\t"); @@ -1886,7 +1886,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) #else TQString("-$(DEL_FILE) -r") #endif - + " \"" + root + fileFixify(dst + filestr, TQString::null, TQString::null, FALSE, FALSE) + "\""); + + " \"" + root + fileFixify(dst + filestr, TQString::null, TQString::null, false, false) + "\""); continue; } fixEnvVariables(dirstr); @@ -1903,20 +1903,20 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs) #else TQString("-$(DEL_FILE) -r") #endif - + " \"" + root + fileFixify(dst + file, TQString::null, TQString::null, FALSE, FALSE) + + + " \"" + root + fileFixify(dst + file, TQString::null, TQString::null, false, false) + "\""); - TQFileInfo fi(Option::fixPathToTargetOS(fileFixify(dirstr + file), TRUE)); + TQFileInfo fi(Option::fixPathToTargetOS(fileFixify(dirstr + file), true)); if(!target.isEmpty()) target += "\t"; TQString cmd = TQString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" + Option::fixPathToTargetOS(fileFixify(dirstr + file, TQString::null, - TQString::null, FALSE, FALSE), FALSE) + + TQString::null, false, false), false) + "\" \"" + root + dst + "\"\n"; target += cmd; if(!project->isActiveConfig("debug") && !fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP")) target += TQString("\t-") + var("QMAKE_STRIP") + " \"" + - root + fileFixify(dst + file, TQString::null, TQString::null, FALSE, FALSE) + + root + fileFixify(dst + file, TQString::null, TQString::null, false, false) + "\"\n"; } } @@ -2025,14 +2025,14 @@ MakefileGenerator::createObjectList(const TQString &var) for(TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { TQFileInfo fi(Option::fixPathToLocalOS((*it))); if(objdir.isEmpty() && project->isActiveConfig("object_with_source")) { - TQString fName = Option::fixPathToTargetOS((*it), FALSE); + TQString fName = Option::fixPathToTargetOS((*it), false); int dl = fName.findRev(Option::dir_sep); if(dl != -1) dir = fName.left(dl + 1); } else { dir = objdir; } - ret.append(dir + fi.baseName(TRUE) + Option::obj_ext); + ret.append(dir + fi.baseName(true) + Option::obj_ext); } return ret; } @@ -2055,7 +2055,7 @@ MakefileGenerator::writeMakefile(TQTextStream &t) t << "####### Install" << endl << endl; writeInstalls(t, "INSTALLS"); - return TRUE; + return true; } TQString MakefileGenerator::buildArgs() @@ -2139,7 +2139,7 @@ MakefileGenerator::writeHeader(TQTextStream &t) t << "# Command: " << build_args() << endl; t << "#############################################################################" << endl; t << endl; - return TRUE; + return true; } @@ -2177,7 +2177,7 @@ MakefileGenerator::writeMakeQmake(TQTextStream &t) << "@" << qmake << endl << endl; } } - return TRUE; + return true; } TQStringList @@ -2227,7 +2227,7 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d, TQString orig_file = file; if(!force_fix && project->isActiveConfig("no_fixpath")) { if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH")) { //absoluteify it - TQString qfile = Option::fixPathToLocalOS(file, TRUE, canon); + TQString qfile = Option::fixPathToLocalOS(file, true, canon); if(TQDir::isRelativePath(file)) { //already absolute TQFileInfo fi(qfile); if(!fi.convertToAbs()) //strange @@ -2235,7 +2235,7 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d, } } } else { //fix it.. - TQString qfile(Option::fixPathToLocalOS(file, TRUE, canon)), in_dir(in_d), out_dir(out_d); + TQString qfile(Option::fixPathToLocalOS(file, true, canon)), in_dir(in_d), out_dir(out_d); { if(out_dir.isNull() || TQDir::isRelativePath(out_dir)) out_dir.prepend(Option::output_dir + TQDir::separator()); @@ -2268,13 +2268,13 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d, file.prepend(Option::dir_sep); file.prepend(in_dir); } - file = Option::fixPathToTargetOS(file, FALSE, canon); - if(canon && TQFile::exists(file) && file == Option::fixPathToTargetOS(file, TRUE, canon)) { + file = Option::fixPathToTargetOS(file, false, canon); + if(canon && TQFile::exists(file) && file == Option::fixPathToTargetOS(file, true, canon)) { TQString real_file = TQDir(file).canonicalPath(); if(!real_file.isEmpty()) file = Option::fixPathToTargetOS(real_file, false, canon); } - TQString match_dir = Option::fixPathToTargetOS(out_dir, FALSE, canon); + TQString match_dir = Option::fixPathToTargetOS(out_dir, false, canon); if(file == match_dir) { file = ""; } else if(file.startsWith(match_dir) && @@ -2303,7 +2303,7 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d, } } } - file = Option::fixPathToTargetOS(file, FALSE, canon); + file = Option::fixPathToTargetOS(file, false, canon); if(file.isEmpty()) file = "."; if(!quote.isNull()) @@ -2363,7 +2363,7 @@ MakefileGenerator::processedDependencies(const TQString &file) { TQString key = dependencyKey(file); if(!depProcessed.contains(key)) - return FALSE; + return false; return depProcessed[key]; } @@ -2433,9 +2433,9 @@ MakefileGenerator::openOutput(TQFile &file) const if(TQDir::isRelativePath(od)) od.prepend(Option::output_dir); Option::output_dir = od; - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 79659507b..4f7c683c2 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -134,9 +134,9 @@ protected: TQString fileFixify(const TQString& file, const TQString &out_dir=TQString::null, - const TQString &in_dir=TQString::null, bool force_fix=FALSE, bool canon=TRUE) const; + const TQString &in_dir=TQString::null, bool force_fix=false, bool canon=true) const; TQStringList fileFixify(const TQStringList& files, const TQString &out_dir=TQString::null, - const TQString &in_dir=TQString::null, bool force_fix=FALSE, bool canon=TRUE) const; + const TQString &in_dir=TQString::null, bool force_fix=false, bool canon=true) const; public: MakefileGenerator(TQMakeProject *p); virtual ~MakefileGenerator(); @@ -180,7 +180,7 @@ inline TQString MakefileGenerator::defaultInstall(const TQString &) { return TQString(""); } inline bool MakefileGenerator::findLibraries() -{ return TRUE; } +{ return true; } inline TQString MakefileGenerator::findDependency(const TQString &) { return TQString(""); } diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index 0bc44a599..03a4f6c8b 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp @@ -60,7 +60,7 @@ TQString project_builtin_regx() //calculate the builtin regular expression.. -ProjectGenerator::ProjectGenerator(TQMakeProject *p) : MakefileGenerator(p), init_flag(FALSE) +ProjectGenerator::ProjectGenerator(TQMakeProject *p) : MakefileGenerator(p), init_flag(false) { } @@ -70,7 +70,7 @@ ProjectGenerator::init() if(init_flag) return; int file_count = 0; - init_flag = TRUE; + init_flag = true; TQMap<TQString, TQStringList> &v = project->variables(); TQString templ = Option::user_template.isEmpty() ? TQString("app") : Option::user_template; @@ -94,12 +94,12 @@ ProjectGenerator::init() for(TQStringList::Iterator pd = dirs.begin(); pd != dirs.end(); pd++) { TQString dir, regex; - bool add_depend = FALSE; + bool add_depend = false; if(TQFile::exists((*pd))) { TQFileInfo fi((*pd)); if(fi.isDir()) { dir = (*pd); - add_depend = TRUE; + add_depend = true; if(dir.right(1) != Option::dir_sep) dir += Option::dir_sep; if(Option::projfile::do_recursive) { @@ -117,7 +117,7 @@ ProjectGenerator::init() if(s != -1) dir = file.left(s+1); if(addFile(file)) { - add_depend = TRUE; + add_depend = true; file_count++; } } @@ -142,7 +142,7 @@ ProjectGenerator::init() for(int i = 0; i < (int)d.count(); i++) { TQString file = dir + d[i]; if (addFile(file)) { - add_depend = TRUE; + add_depend = true; file_count++; } } @@ -235,7 +235,7 @@ ProjectGenerator::init() } TQPtrList<MakefileDependDir> deplist; - deplist.setAutoDelete(TRUE); + deplist.setAutoDelete(true); { TQStringList &d = v["DEPENDPATH"]; for(TQStringList::Iterator it = d.begin(); it != d.end(); ++it) { @@ -244,12 +244,12 @@ ProjectGenerator::init() } } TQStringList &h = v["HEADERS"]; - bool no_qt_files = TRUE; + bool no_qt_files = true; TQString srcs[] = { "SOURCES", "YACCSOURCES", "LEXSOURCES", "INTERFACES", TQString::null }; for(int i = 0; !srcs[i].isNull(); i++) { TQStringList &l = v[srcs[i]]; for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) { - if(generateDependencies(deplist, (*val_it), TRUE)) { + if(generateDependencies(deplist, (*val_it), true)) { TQStringList &tmp = findDependencies((*val_it)); if(!tmp.isEmpty()) { for(TQStringList::Iterator dep_it = tmp.begin(); dep_it != tmp.end(); ++dep_it) { @@ -262,7 +262,7 @@ ProjectGenerator::init() } } if(no_qt_files && file_no_path.find(TQRegExp("^q[a-z_0-9].h$")) != -1) - no_qt_files = FALSE; + no_qt_files = false; TQString h_ext; for(TQStringList::Iterator hit = Option::h_ext.begin(); hit != Option::h_ext.end(); ++hit) { @@ -282,12 +282,12 @@ ProjectGenerator::init() TQString src((*dep_it).left((*dep_it).length() - h_ext.length()) + (*cppit)); if(TQFile::exists(src)) { - bool exists = FALSE; + bool exists = false; TQStringList &srcl = v["SOURCES"]; for(TQStringList::Iterator src_it = srcl.begin(); src_it != srcl.end(); ++src_it) { if((*src_it).lower() == src.lower()) { - exists = TRUE; + exists = true; break; } } @@ -309,7 +309,7 @@ ProjectGenerator::init() } } if(h.isEmpty()) - addConfig("moc", FALSE); + addConfig("moc", false); //if we find a file that matches an forms it needn't be included in the project TQStringList &u = v["INTERFACES"]; @@ -318,19 +318,19 @@ ProjectGenerator::init() for(int i = 0; !no_ui[i].isNull(); i++) { TQStringList &l = v[no_ui[i]]; for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ) { - bool found = FALSE; + 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).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; + found = true; break; } } if(!found && (*val_it).endsWith(Option::cpp_moc_ext)) - found = TRUE; + found = true; if(found) val_it = l.remove(val_it); else @@ -350,14 +350,14 @@ ProjectGenerator::writeMakefile(TQTextStream &t) TQStringList::Iterator it; for(it = Option::before_user_vars.begin(); it != Option::before_user_vars.end(); ++it) t << (*it) << endl; - t << getWritableVar("TEMPLATE_ASSIGN", FALSE); + t << getWritableVar("TEMPLATE_ASSIGN", false); if(project->first("TEMPLATE_ASSIGN") == "subdirs") { t << endl << "# Directories" << "\n" << getWritableVar("SUBDIRS"); } else { t << getWritableVar("TARGET") - << getWritableVar("CONFIG", FALSE) - << getWritableVar("CONFIG_REMOVE", FALSE) + << getWritableVar("CONFIG", false) + << getWritableVar("CONFIG_REMOVE", false) << getWritableVar("DEPENDPATH") << getWritableVar("INCLUDEPATH") << endl; @@ -371,7 +371,7 @@ ProjectGenerator::writeMakefile(TQTextStream &t) } for(it = Option::after_user_vars.begin(); it != Option::after_user_vars.end(); ++it) t << (*it) << endl; - return TRUE; + return true; } bool @@ -382,9 +382,9 @@ ProjectGenerator::addConfig(const TQString &cfg, bool add) where = "CONFIG_REMOVE"; if(!project->variables()[where].contains(cfg)) { project->variables()[where] += cfg; - return TRUE; + return true; } - return FALSE; + return false; } @@ -397,13 +397,13 @@ ProjectGenerator::addFile(TQString file) if(s != -1) dir = file.left(s+1); if(file.mid(dir.length(), Option::h_moc_mod.length()) == Option::h_moc_mod) - return FALSE; + return false; TQString where; for(TQStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) { if(file.endsWith((*cppit))) { if(TQFile::exists(file.left(file.length() - (*cppit).length()) + Option::ui_ext)) - return FALSE; + return false; else where = "SOURCES"; break; @@ -433,9 +433,9 @@ ProjectGenerator::addFile(TQString file) TQString newfile = fileFixify(file); if(!where.isEmpty() && !project->variables()[where].contains(file)) { project->variables()[where] += newfile; - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/qmake/generators/projectgenerator.h b/qmake/generators/projectgenerator.h index a35aa2647..475746dcf 100644 --- a/qmake/generators/projectgenerator.h +++ b/qmake/generators/projectgenerator.h @@ -44,8 +44,8 @@ class ProjectGenerator : public MakefileGenerator { bool init_flag; bool addFile(TQString); - bool addConfig(const TQString &, bool add=TRUE); - TQString getWritableVar(const TQString &, bool fixPath=TRUE); + bool addConfig(const TQString &, bool add=true); + TQString getWritableVar(const TQString &, bool fixPath=true); protected: virtual void init(); virtual bool writeMakefile(TQTextStream &); diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index a3532f971..9f2359f1b 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -50,7 +50,7 @@ UnixMakefileGenerator::init() { if(init_flag) return; - init_flag = TRUE; + init_flag = true; if(!project->isEmpty("QMAKE_FAILED_REQUIREMENTS")) /* no point */ return; @@ -244,7 +244,7 @@ UnixMakefileGenerator::init() project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_THREAD"]; } if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setMocAware(true); TQString compile_flag = var("QMAKE_COMPILE_FLAG"); if(compile_flag.isEmpty()) compile_flag = "-c"; @@ -271,7 +271,7 @@ UnixMakefileGenerator::init() project->variables()["QMAKE_RUN_CXX_IMP"].append("$(CXX) " + compile_flag + " $(CXXFLAGS) $(INCPATH) -o $@ $<"); project->variables()["QMAKE_FILETAGS"] += TQStringList::split("HEADERS SOURCES TARGET DESTDIR", " "); if( project->isActiveConfig("GNUmake") && !project->isEmpty("QMAKE_CFLAGS_DEPS")) - include_deps = TRUE; //do not generate deps + include_deps = true; //do not generate deps if(project->isActiveConfig("compile_libtool")) Option::obj_ext = ".lo"; //override the .o @@ -356,7 +356,7 @@ UnixMakefileGenerator::init() if(rpath.right(1) != Option::dir_sep) { rpath += Option::dir_sep; } - comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, FALSE); + comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, false); } } } @@ -396,14 +396,14 @@ UnixMakefileGenerator::combineSetLFlags(const TQStringList &list1, const TQStrin } ret.append((*it)); } else if(project->isActiveConfig("macx") && (*it).startsWith("-framework")) { - int as_one = TRUE; + int as_one = true; TQString framework_in; if((*it).length() > 11) { framework_in = (*it).mid(11); } else { if(it != lst->end()) { ++it; - as_one = FALSE; + as_one = false; framework_in = (*it); } } @@ -539,7 +539,7 @@ bool UnixMakefileGenerator::findLibraries() { TQPtrList<MakefileDependDir> libdirs; - libdirs.setAutoDelete(TRUE); + libdirs.setAutoDelete(true); const TQString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_LIBS", TQString::null }; for(int i = 0; !lflags[i].isNull(); i++) { TQStringList &l = project->variables()[lflags[i]]; @@ -581,7 +581,7 @@ UnixMakefileGenerator::findLibraries() if(!stub.isEmpty()) { const TQString modifs[] = { "", "-mt", TQString::null }; for(int modif = 0; !modifs[modif].isNull(); modif++) { - bool found = FALSE; + bool found = false; TQStringList extens; if(!extn.isNull()) extens << extn; @@ -599,13 +599,13 @@ UnixMakefileGenerator::findLibraries() } if(!lib_stub.isNull()) { (*it) = "-l" + lib_stub; - found = TRUE; + found = true; break; } } else { if(TQFile::exists("lib" + stub + modifs[modif] + "." + (*extit))) { (*it) = "lib" + stub + modifs[modif] + "." + (*extit); - found = TRUE; + found = true; break; } } @@ -614,7 +614,7 @@ UnixMakefileGenerator::findLibraries() for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) { if(TQFile::exists(mdd->local_dir + Option::dir_sep + "lib" + stub + modifs[modif] + Option::libtool_ext)) { (*it) = mdd->real_dir + Option::dir_sep + "lib" + stub + modifs[modif] + Option::libtool_ext; - found = TRUE; + found = true; break; } } @@ -626,7 +626,7 @@ UnixMakefileGenerator::findLibraries() } } } - return FALSE; + return false; } TQString linkLib(const TQString &file, const TQString &libName) { @@ -642,10 +642,10 @@ UnixMakefileGenerator::processPrlFiles() { TQDict<void> processed; TQPtrList<MakefileDependDir> libdirs; - libdirs.setAutoDelete(TRUE); + libdirs.setAutoDelete(true); const TQString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_LIBS", TQString::null }; for(int i = 0; !lflags[i].isNull(); i++) { - for(bool ret = FALSE; TRUE; ret = FALSE) { + for(bool ret = false; true; ret = false) { TQStringList l_out; TQStringList &l = project->variables()[lflags[i]]; for(TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { @@ -675,7 +675,7 @@ UnixMakefileGenerator::processPrlFiles() prl.replace(0, mdd->local_dir.length(), mdd->real_dir); opt = linkLib(prl, lib); processed.insert(opt, (void*)1); - ret = TRUE; + ret = true; break; } } @@ -689,7 +689,7 @@ UnixMakefileGenerator::processPrlFiles() TQString prl = "/System/Library/Frameworks/" + opt + ".framework/" + opt; if(processPrlFile(prl)) - ret = TRUE; + ret = true; l_out.append("-framework"); } if(!opt.isEmpty()) @@ -699,7 +699,7 @@ UnixMakefileGenerator::processPrlFiles() TQString lib = opt; if(!processed[lib] && processPrlFile(lib)) { processed.insert(lib, (void*)1); - ret = TRUE; + ret = true; } #if 0 if(ret) @@ -724,11 +724,11 @@ UnixMakefileGenerator::defaultInstall(const TQString &t) if(t != "target" || project->first("TEMPLATE") == "subdirs") return TQString(); - bool resource = FALSE; + bool resource = false; const TQString root = "$(INSTALL_ROOT)"; TQStringList &uninst = project->variables()[t + ".uninstall"]; TQString ret, destdir=project->first("DESTDIR"); - TQString targetdir = Option::fixPathToTargetOS(project->first("target.path"), FALSE); + TQString targetdir = Option::fixPathToTargetOS(project->first("target.path"), false); if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep) destdir += Option::dir_sep; targetdir = fileFixify(targetdir); @@ -742,7 +742,7 @@ UnixMakefileGenerator::defaultInstall(const TQString &t) if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { destdir += "../../../"; target += ".app"; - resource = TRUE; + resource = true; } } else if(project->first("TEMPLATE") == "lib") { if(project->isActiveConfig("create_prl") && !project->isActiveConfig("no_install_prl") && @@ -827,7 +827,7 @@ UnixMakefileGenerator::defaultInstall(const TQString &t) } else { TQString src_targ = target; if(!destdir.isEmpty()) - src_targ = Option::fixPathToTargetOS(destdir + target, FALSE); + src_targ = Option::fixPathToTargetOS(destdir + target, false); TQString dst_targ = root + targetdir + target; if(!ret.isEmpty()) ret += "\n\t"; @@ -861,7 +861,7 @@ UnixMakefileGenerator::defaultInstall(const TQString &t) Option::target_mode == Option::TARG_MAC9_MODE) { } else if(Option::target_mode == Option::TARG_UNIX_MODE || Option::target_mode == Option::TARG_MACX_MODE) { - TQString link = Option::fixPathToTargetOS(destdir + (*it), FALSE); + TQString link = Option::fixPathToTargetOS(destdir + (*it), false); int lslash = link.findRev(Option::dir_sep); if(lslash != -1) link = link.right(link.length() - (lslash + 1)); diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h index e243e1a5f..f118bdd2b 100644 --- a/qmake/generators/unix/unixmake.h +++ b/qmake/generators/unix/unixmake.h @@ -72,7 +72,7 @@ protected: virtual void init(); void writeMakeParts(TQTextStream &); - void writeSubdirs(TQTextStream &, bool=TRUE); + void writeSubdirs(TQTextStream &, bool=true); private: void init2(); diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 1678e22c5..61c146b94 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -46,7 +46,7 @@ TQString mkdir_p_asstring(const TQString &dir); -UnixMakefileGenerator::UnixMakefileGenerator(TQMakeProject *p) : MakefileGenerator(p), init_flag(FALSE), include_deps(FALSE) +UnixMakefileGenerator::UnixMakefileGenerator(TQMakeProject *p) : MakefileGenerator(p), init_flag(false), include_deps(false) { } @@ -85,7 +85,7 @@ UnixMakefileGenerator::writeMakefile(TQTextStream &t) << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" << "@echo \"Skipped.\"" << endl << endl; writeMakeQmake(t); - return TRUE; + return true; } if (project->variables()["TEMPLATE"].first() == "app" || @@ -94,24 +94,24 @@ UnixMakefileGenerator::writeMakefile(TQTextStream &t) return MakefileGenerator::writeMakefile(t); } else if(project->variables()["TEMPLATE"].first() == "subdirs") { writeSubdirs(t); - return TRUE; + return true; } - return FALSE; + return false; } void UnixMakefileGenerator::writeExtraVariables(TQTextStream &t) { - bool first = TRUE; + bool first = true; TQMap<TQString, TQStringList> &vars = project->variables(); TQStringList &exports = project->variables()["QMAKE_EXTRA_UNIX_VARIABLES"]; for(TQMap<TQString, TQStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) { for(TQStringList::Iterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) { - TQRegExp rx((*exp_it), FALSE, TRUE); + TQRegExp rx((*exp_it), false, true); if(rx.exactMatch(it.key())) { if(first) { t << "\n####### Custom Variables" << endl; - first = FALSE; + first = false; } t << "EXPORT_" << it.key() << " = " << it.data().join(" ") << endl; } @@ -129,7 +129,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) !project->variables()["QMAKE_INCREMENTAL"].isEmpty() && (!project->variables()["QMAKE_APP_FLAG"].isEmpty() || !project->isActiveConfig("staticlib"))), - src_incremental=FALSE, moc_incremental=FALSE; + src_incremental=false, moc_incremental=false; t << "####### Compiler, tools and options" << endl << endl; if (varGlue("INCLUDEPATH", " -I", " -I", "").find("$(LOCALBASE)") != -1) @@ -217,10 +217,10 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) TQStringList &objs = project->variables()["OBJECTS"], &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out; t << "OBJECTS = "; for(TQStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) { - bool increment = FALSE; + bool increment = false; for(TQStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) { - if((*objit).find(TQRegExp((*incrit), TRUE, TRUE)) != -1) { - increment = TRUE; + if((*objit).find(TQRegExp((*incrit), true, true)) != -1) { + increment = true; incrs_out.append((*objit)); break; } @@ -233,7 +233,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) } else if(!incrs_out.count()) { t << endl; } else { - src_incremental = TRUE; + src_incremental = true; t << endl; t << "INCREMENTAL_OBJECTS = " << incrs_out.join(" \\\n\t\t") << endl; } @@ -250,10 +250,10 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out; t << "OBJMOC = "; for(TQStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) { - bool increment = FALSE; + bool increment = false; for(TQStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) { - if((*objit).find(TQRegExp((*incrit), TRUE, TRUE)) != -1) { - increment = TRUE; + if((*objit).find(TQRegExp((*incrit), true, true)) != -1) { + increment = true; incrs_out.append((*objit)); break; } @@ -266,7 +266,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) } else if(!incrs_out.count()) { t << endl; } else { - moc_incremental = TRUE; + moc_incremental = true; t << endl; t << "INCREMENTAL_OBJMOC = " << incrs_out.join(" \\\n\t\t") << endl; } @@ -274,7 +274,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) t << "OBJMOC = " << objMoc << endl; } if(do_incremental && !moc_incremental && !src_incremental) - do_incremental = FALSE; + do_incremental = false; if(!project->isEmpty("QMAKE_EXTRA_UNIX_COMPILERS")) { t << "OBJCOMP = " << varList("OBJCOMP") << endl; target_deps += " $(OBJCOMP)"; @@ -807,8 +807,8 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir); if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep) dir += Option::dir_sep; - clean << ( dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first() ); - clean << ( dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first() ); + clean << ( dir + fi.baseName(true) + Option::yacc_mod + Option::cpp_ext.first() ); + clean << ( dir + fi.baseName(true) + Option::yacc_mod + Option::h_ext.first() ); } if(!clean.isEmpty()) { t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n"; @@ -827,7 +827,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir); if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep) dir += Option::dir_sep; - clean << ( dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first() ); + clean << ( dir + fi.baseName(true) + Option::lex_mod + Option::cpp_ext.first() ); } if(!clean.isEmpty()) { t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n"; @@ -963,7 +963,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) TQStringList &inputs = project->variables()[(*it2)]; for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) { TQFileInfo fi(Option::fixPathToLocalOS((*input))); - TQString in = Option::fixPathToTargetOS((*input), FALSE), + TQString in = Option::fixPathToTargetOS((*input), false), out = tmp_out, cmd = tmp_cmd, deps; out.replace("${QMAKE_FILE_BASE}", fi.baseName()); out.replace("${QMAKE_FILE_NAME}", fi.filePath()); @@ -1397,7 +1397,7 @@ void UnixMakefileGenerator::init2() TQStringList &inputs = project->variables()[(*it2)]; for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) { TQFileInfo fi(Option::fixPathToLocalOS((*input))); - TQString in = Option::fixPathToTargetOS((*input), FALSE), + TQString in = Option::fixPathToTargetOS((*input), false), out = tmp_out; out.replace("${QMAKE_FILE_BASE}", fi.baseName()); out.replace("${QMAKE_FILE_NAME}", fi.filePath()); @@ -1493,7 +1493,7 @@ UnixMakefileGenerator::writeLibtoolFile() if(install_dir.isEmpty()) install_dir = project->first("DESTDIR"); t << "# Directory that this library needs to be installed in:\n" - "libdir='" << Option::fixPathToTargetOS(install_dir, FALSE) << "'\n"; + "libdir='" << Option::fixPathToTargetOS(install_dir, false) << "'\n"; } TQString diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 069524314..2ff61c2c8 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -44,7 +44,7 @@ #include <time.h> -MingwMakefileGenerator::MingwMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE) +MingwMakefileGenerator::MingwMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(false) { Option::obj_ext = ".o"; } @@ -52,7 +52,7 @@ MingwMakefileGenerator::MingwMakefileGenerator(TQMakeProject *p) : Win32Makefile bool MingwMakefileGenerator::findLibraries() // todo - pascal { - return TRUE; + return true; } bool @@ -65,7 +65,7 @@ MingwMakefileGenerator::writeMakefile(TQTextStream &t) << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" << "@echo \"Skipped.\"" << endl << endl; writeMakeQmake(t); - return TRUE; + return true; } if(project->first("TEMPLATE") == "app" || @@ -75,9 +75,9 @@ MingwMakefileGenerator::writeMakefile(TQTextStream &t) } else if(project->first("TEMPLATE") == "subdirs") { writeSubDirs(t); - return TRUE; + return true; } - return FALSE; + return false; } void createLdObjectScriptFile(const TQString & fileName, TQStringList & objList) @@ -136,15 +136,15 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t) t << "LIB = " << var("QMAKE_LIB") << endl; } t << "MOC = " << (project->isEmpty("QMAKE_MOC") ? TQString("moc") : - Option::fixPathToTargetOS(var("QMAKE_MOC"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_MOC"), false)) << endl; t << "UIC = " << (project->isEmpty("QMAKE_UIC") ? TQString("uic") : - Option::fixPathToTargetOS(var("QMAKE_UIC"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_UIC"), false)) << endl; t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? TQString("qmake") : - Option::fixPathToTargetOS(var("QMAKE_QMAKE"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl; t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? TQString("idc") : - Option::fixPathToTargetOS(var("QMAKE_IDC"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl; t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? TQString("midl") : - Option::fixPathToTargetOS(var("QMAKE_IDL"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_IDL"), false)) << endl; t << "ZIP = " << var("QMAKE_ZIP") << endl; t << "DEF_FILE = " << varList("DEF_FILE") << endl; t << "COPY_FILE = " << var("QMAKE_COPY") << endl; @@ -333,7 +333,7 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t) TQStringList &inputs = project->variables()[(*it2)]; for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) { TQFileInfo fi(Option::fixPathToLocalOS((*input))); - TQString in = Option::fixPathToTargetOS((*input), FALSE), + TQString in = Option::fixPathToTargetOS((*input), false), out = tmp_out, cmd = tmp_cmd, deps; out.replace("${QMAKE_FILE_BASE}", fi.baseName()); out.replace("${QMAKE_FILE_NAME}", fi.filePath()); @@ -376,7 +376,7 @@ MingwMakefileGenerator::init() { if(init_flag) return; - init_flag = TRUE; + init_flag = true; /* this should probably not be here, but I'm using it to wrap the .t files */ if(project->first("TEMPLATE") == "app") @@ -602,7 +602,7 @@ MingwMakefileGenerator::init() } if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setMocAware(true); // add -L libs to libdir TQStringList &libs = project->variables()["QMAKE_LIBS"]; @@ -622,7 +622,7 @@ MingwMakefileGenerator::init() for(it = l.begin(); it != l.end(); ++it) { TQStringList &gdmf = project->variables()[(*it)]; for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) - (*inner) = Option::fixPathToTargetOS((*inner), FALSE); + (*inner) = Option::fixPathToTargetOS((*inner), false); } if ( project->isActiveConfig("dll") ) { @@ -686,7 +686,7 @@ MingwMakefileGenerator::init() TQStringList &inputs = project->variables()[(*it2)]; for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) { TQFileInfo fi(Option::fixPathToLocalOS((*input))); - TQString in = Option::fixPathToTargetOS((*input), FALSE), + TQString in = Option::fixPathToTargetOS((*input), false), out = tmp_out; out.replace("${QMAKE_FILE_BASE}", fi.baseName()); out.replace("${QMAKE_FILE_NAME}", fi.filePath()); @@ -704,7 +704,7 @@ MingwMakefileGenerator::writeSubDirs(TQTextStream &t) TQTextStream ts (&qs, IO_WriteOnly) ; Win32MakefileGenerator::writeSubDirs( ts ) ; TQRegExp rx("(\\n\\tcd [^\\n\\t]+)(\\n\\t.+)\\n\\t@cd ..") ; - rx.setMinimal(TRUE); + rx.setMinimal(true); int pos = 0 ; while ( -1 != (pos = rx.search( qs, pos))) { diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp index 6b6b8fdbd..962db7229 100644 --- a/qmake/generators/win32/msvc_dsp.cpp +++ b/qmake/generators/win32/msvc_dsp.cpp @@ -43,7 +43,7 @@ #include <stdlib.h> #include <time.h> -DspMakefileGenerator::DspMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE) +DspMakefileGenerator::DspMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(false) { } @@ -55,7 +55,7 @@ DspMakefileGenerator::writeMakefile(TQTextStream &t) /* for now just dump, I need to generated an empty dsp or something.. */ fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n", var("QMAKE_FAILED_REQUIREMENTS").latin1()); - return TRUE; + return true; } if(project->first("TEMPLATE") == "vcapp" || @@ -65,9 +65,9 @@ DspMakefileGenerator::writeMakefile(TQTextStream &t) else if(project->first("TEMPLATE") == "subdirs") { writeHeader(t); writeSubDirs(t); - return TRUE; + return true; } - return FALSE; + return false; } bool @@ -86,7 +86,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t) TQFile file(dspfile_loc); if(!file.open(IO_ReadOnly)) { fprintf(stderr, "Cannot open dsp file: %s\n", dspfile.latin1()); - return FALSE; + return false; } TQTextStream dsp(&file); @@ -374,7 +374,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t) f.close(); // create an output step for images not more than once - bool imagesBuildDone = FALSE; + bool imagesBuildDone = false; for( it = list.begin(); it != list.end(); ++it ) { // beginGroupForFile((*it), t); t << "# Begin Source File\n\nSOURCE=" << (*it) << endl; @@ -384,7 +384,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t) uicpath = uicpath.replace(TQRegExp("\\..*$"), "") + " "; if ( !imagesBuildDone ) { - imagesBuildDone = TRUE; + imagesBuildDone = true; TQString build = "\n\n# Begin Custom Build - Creating image collection...\n" "InputPath=.\\" + base + "\n\n"; @@ -577,7 +577,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t) } t << endl; file.close(); - return TRUE; + return true; } @@ -588,7 +588,7 @@ DspMakefileGenerator::init() if(init_flag) return; TQStringList::Iterator it; - init_flag = TRUE; + init_flag = true; const bool thread = project->isActiveConfig("thread"); @@ -824,7 +824,7 @@ DspMakefileGenerator::init() TQString targetfilename = project->variables()["TARGET"].first(); project->variables()["TARGET"].first() += project->first("TARGET_EXT"); if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setMocAware(true); project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; project->variables()["QMAKE_FILETAGS"] += TQStringList::split(' ', @@ -833,7 +833,7 @@ DspMakefileGenerator::init() for(it = l.begin(); it != l.end(); ++it) { TQStringList &gdmf = project->variables()[(*it)]; for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) - (*inner) = Option::fixPathToTargetOS((*inner), FALSE); + (*inner) = Option::fixPathToTargetOS((*inner), false); } MakefileGenerator::init(); @@ -1061,7 +1061,7 @@ DspMakefileGenerator::beginGroupForFile(TQString file, TQTextStream &t, { if(project->isActiveConfig("flat")) return; - fileFixify(file, TQDir::currentDirPath(), TQDir::currentDirPath(), TRUE); + fileFixify(file, TQDir::currentDirPath(), TQDir::currentDirPath(), true); file = file.section(Option::dir_sep, 0, -2); if(file.right(Option::dir_sep.length()) != Option::dir_sep) file += Option::dir_sep; diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index a1ada25f5..145ee41e0 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -44,7 +44,7 @@ #include <stdlib.h> #include <time.h> -NmakeMakefileGenerator::NmakeMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE) +NmakeMakefileGenerator::NmakeMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(false) { } @@ -64,7 +64,7 @@ NmakeMakefileGenerator::writeMakefile(TQTextStream &t) << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" << "@echo \"Skipped.\"" << endl << endl; writeMakeQmake(t); - return TRUE; + return true; } if(project->first("TEMPLATE") == "app" || @@ -74,9 +74,9 @@ NmakeMakefileGenerator::writeMakefile(TQTextStream &t) } else if(project->first("TEMPLATE") == "subdirs") { writeSubDirs(t); - return TRUE; + return true; } - return FALSE; + return false; } TQStringList @@ -146,15 +146,15 @@ NmakeMakefileGenerator::writeNmakeParts(TQTextStream &t) t << "LIB = " << var("QMAKE_LIB") << endl; } t << "MOC = " << (project->isEmpty("QMAKE_MOC") ? TQString("moc") : - Option::fixPathToTargetOS(var("QMAKE_MOC"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_MOC"), false)) << endl; t << "UIC = " << (project->isEmpty("QMAKE_UIC") ? TQString("uic") : - Option::fixPathToTargetOS(var("QMAKE_UIC"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_UIC"), false)) << endl; t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? TQString("qmake") : - Option::fixPathToTargetOS(var("QMAKE_QMAKE"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl; t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? TQString("idc") : - Option::fixPathToTargetOS(var("QMAKE_IDC"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl; t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? TQString("midl") : - Option::fixPathToTargetOS(var("QMAKE_IDL"), FALSE)) << endl; + Option::fixPathToTargetOS(var("QMAKE_IDL"), false)) << endl; t << "ZIP = " << var("QMAKE_ZIP") << endl; t << "COPY_FILE = " << var("QMAKE_COPY") << endl; t << "COPY_DIR = " << var("QMAKE_COPY") << endl; @@ -377,7 +377,7 @@ NmakeMakefileGenerator::writeNmakeParts(TQTextStream &t) TQStringList &inputs = project->variables()[(*it2)]; for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) { TQFileInfo fi(Option::fixPathToLocalOS((*input))); - TQString in = Option::fixPathToTargetOS((*input), FALSE), + TQString in = Option::fixPathToTargetOS((*input), false), out = tmp_out, cmd = tmp_cmd, deps; out.replace("${QMAKE_FILE_BASE}", fi.baseName()); out.replace("${QMAKE_FILE_NAME}", fi.filePath()); @@ -461,7 +461,7 @@ NmakeMakefileGenerator::init() { if(init_flag) return; - init_flag = TRUE; + init_flag = true; /* this should probably not be here, but I'm using it to wrap the .t files */ if(project->first("TEMPLATE") == "app") @@ -680,7 +680,7 @@ NmakeMakefileGenerator::init() if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setMocAware(true); project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; TQStringList &libList = project->variables()["QMAKE_LIBS"]; @@ -704,7 +704,7 @@ NmakeMakefileGenerator::init() for(it = l.begin(); it != l.end(); ++it) { TQStringList &gdmf = project->variables()[(*it)]; for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) - (*inner) = Option::fixPathToTargetOS((*inner), FALSE); + (*inner) = Option::fixPathToTargetOS((*inner), false); } if ( !project->variables()["DEF_FILE"].isEmpty() ) @@ -780,7 +780,7 @@ NmakeMakefileGenerator::init() TQStringList &inputs = project->variables()[(*it2)]; for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) { TQFileInfo fi(Option::fixPathToLocalOS((*input))); - TQString in = Option::fixPathToTargetOS((*input), FALSE), + TQString in = Option::fixPathToTargetOS((*input), false), out = tmp_out; out.replace("${QMAKE_FILE_BASE}", fi.baseName()); out.replace("${QMAKE_FILE_NAME}", fi.filePath()); diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 13dd83390..3e20838d5 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -476,25 +476,25 @@ bool VCCLCompilerTool::parseOption( const char* option ) char second = option[2]; char third = option[3]; char fourth = option[4]; - bool found = TRUE; + bool found = true; switch ( first ) { case '?': case 'h': tqWarning( "Generator: Option '/?', '/help': MSVC.NET projects do not support outputting help info" ); - found = FALSE; + found = false; break; case '@': tqWarning( "Generator: Option '/@': MSVC.NET projects do not support the use of a response file" ); - found = FALSE; + found = false; break; case 'l': tqWarning( "Generator: Option '/link': qmake generator does not support passing link options through the compiler tool" ); - found = FALSE; + found = false; break; case 'A': if ( second != 'I' ) { - found = FALSE; break; + found = false; break; } AdditionalUsingDirectories += option+3; break; @@ -520,7 +520,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) AdditionalOptions += option; break; } - found = FALSE; break; + found = false; break; } GeneratePreprocessedFile = preprocessYes; break; @@ -577,7 +577,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) ExpandAttributedSource = _True; break; default: - found = FALSE; break; + found = false; break; } } break; @@ -586,7 +586,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) case '3': case '4': tqWarning( "Option '/G3' and '/G4' were phased out in Visual C++ 5.0" ); - found = FALSE; break; + found = false; break; case '5': OptimizeForProcessor = procOptimizePentium; break; @@ -655,7 +655,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) CallingConvention = callConventionStdCall; break; default: - found = FALSE; break; + found = false; break; } break; case 'H': @@ -669,7 +669,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) AdditionalOptions += option; break; } - found = FALSE; break; + found = false; break; case 'M': if ( second == 'D' ) { RuntimeLibrary = rtMultiThreadedDLL; @@ -687,7 +687,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) RuntimeLibrary = rtMultiThreadedDebug; break; } - found = FALSE; break; + found = false; break; case 'O': switch ( second ) { case '1': @@ -707,7 +707,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) else if ( third == '2' ) InlineFunctionExpansion = expandAnySuitable; else - found = FALSE; + found = false; break; case 'd': Optimization = optimizeDisabled; @@ -741,7 +741,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) OmitFramePointers = _False; break; default: - found = FALSE; break; + found = false; break; } break; case 'P': @@ -752,7 +752,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) AdditionalOptions += option; break; } - found = FALSE; break; + found = false; break; case 'R': if ( second == 'T' && third == 'C' ) { if ( fourth == '1' ) @@ -764,7 +764,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) else if ( fourth == 'u' ) BasicRuntimeChecks = runtimeCheckUninitVariables; else - found = FALSE; break; + found = false; break; } break; case 'T': @@ -774,7 +774,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) CompileAs = compileAsCPlusPlus; } else { tqWarning( "Generator: Options '/Tp<filename>' and '/Tc<filename>' are not supported by qmake" ); - found = FALSE; break; + found = false; break; } break; case 'U': @@ -814,7 +814,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) } // Fallthrough default: - found = FALSE; break; + found = false; break; } break; case 'X': @@ -843,7 +843,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) PrecompiledHeaderFile = option+3; break; default: - found = FALSE; break; + found = false; break; } break; case 'Z': @@ -876,9 +876,9 @@ bool VCCLCompilerTool::parseOption( const char* option ) else if ( fourth == 'w' ) TreatWChar_tAsBuiltInType = _True; else - found = FALSE; + found = false; } else { - found = FALSE; break; + found = false; break; } break; case 'g': @@ -905,11 +905,11 @@ bool VCCLCompilerTool::parseOption( const char* option ) StructMemberAlignment = alignEightBytes; break; default: - found = FALSE; break; + found = false; break; } break; default: - found = FALSE; break; + found = false; break; } break; case 'c': @@ -923,12 +923,12 @@ bool VCCLCompilerTool::parseOption( const char* option ) CompileAsManaged = managedAssembly; } } else { - found = FALSE; break; + found = false; break; } break; case 'd': if ( second != 'r' ) { - found = FALSE; break; + found = false; break; } CompileAsManaged = managedAssembly; break; @@ -941,19 +941,19 @@ bool VCCLCompilerTool::parseOption( const char* option ) SuppressStartupBanner = _True; break; } - found = FALSE; break; + found = false; break; case 'o': if ( second == 'p' && third == 'e' && fourth == 'n' ) { OpenMP = _True; break; } - found = FALSE; break; + found = false; break; case 's': if ( second == 'h' && third == 'o' && fourth == 'w' ) { ShowIncludes = _True; break; } - found = FALSE; break; + found = false; break; case 'u': UndefineAllPreprocessorDefinitions = _True; break; @@ -962,7 +962,7 @@ bool VCCLCompilerTool::parseOption( const char* option ) AdditionalOptions += option; break; } - found = FALSE; break; + found = false; break; case 'w': switch ( second ) { case '\0': @@ -976,11 +976,11 @@ bool VCCLCompilerTool::parseOption( const char* option ) } break; default: - found = FALSE; break; + found = false; break; } if( !found ) warn_msg( WarnLogic, "Could not parse Compiler option: %s", option ); - return TRUE; + return true; } // VCLinkerTool ----------------------------------------------------- @@ -1147,7 +1147,7 @@ bool VCLinkerTool::parseOption( const char* option ) displayHash( "CONSOLE" ); displayHash( "EFI_APPLICATION" ); displayHash( "EFI_BOOT_SERVICE_DRIVER" ); displayHash( "EFI_ROM" ); displayHash( "EFI_RUNTIME_DRIVER" ); displayHash( "NATIVE" ); displayHash( "POSIX" ); displayHash( "WINDOWS" ); displayHash( "WINDOWSCE" ); displayHash( "NET" ); displayHash( "CD" ); displayHash( "NO" ); #endif - bool found = TRUE; + bool found = true; switch ( elfHash(option) ) { case 0x3360dbe: // /ALIGN[:number] case 0x1485c34: // /ALLOWBIND[:NO] @@ -1265,7 +1265,7 @@ bool VCLinkerTool::parseOption( const char* option ) TargetMachine = machineX86; break; default: - found = FALSE; + found = false; } break; case 0x0034160: // /MAP[:filename] @@ -1324,7 +1324,7 @@ bool VCLinkerTool::parseOption( const char* option ) OptimizeForWindows98 = optWin98No; break; default: - found = FALSE; + found = false; } } break; @@ -1373,7 +1373,7 @@ bool VCLinkerTool::parseOption( const char* option ) AdditionalOptions += option; break; default: - found = FALSE; + found = false; } } break; @@ -1383,7 +1383,7 @@ bool VCLinkerTool::parseOption( const char* option ) else if ( *(option+9) == 'C' ) SwapRunFromCD = _True; else - found = FALSE; + found = false; break; case 0x34906d4: // /TLBID:id TypeLibraryResourceID = TQString( option+7 ).toLong(); @@ -1409,7 +1409,7 @@ bool VCLinkerTool::parseOption( const char* option ) Version = option+9; break; default: - found = FALSE; + found = false; } if( !found ) warn_msg( WarnLogic, "Could not parse Linker options: %s", option ); @@ -1506,7 +1506,7 @@ bool VCMIDLTool::parseOption( const char* option ) displayHash( "/target {system}" ); displayHash( "/tlb filename" ); displayHash( "/use_epv" ); displayHash( "/win32" ); displayHash( "/win64" ); #endif - bool found = TRUE; + bool found = true; int offset = 0; switch( elfHash(option) ) { case 0x0000334: // /D name[=def] @@ -1542,7 +1542,7 @@ bool VCMIDLTool::parseOption( const char* option ) StructMemberAlignment = midlAlignEightBytes; break; default: - found = FALSE; + found = false; } break; case 0x0359e82: // /char {ascii7|signed|unsigned} @@ -1557,7 +1557,7 @@ bool VCMIDLTool::parseOption( const char* option ) DefaultCharType = midlCharUnsigned; break; default: - found = FALSE; + found = false; } break; case 0xa766524: // /cpp_opt options @@ -1594,7 +1594,7 @@ bool VCMIDLTool::parseOption( const char* option ) ErrorCheckStubData = _True; break; default: - found = FALSE; + found = false; } break; case 0x5eb7af2: // /header filename @@ -1699,14 +1699,14 @@ bool VCMIDLTool::parseOption( const char* option ) WarningLevel = midlWarningLevel_4; break; default: - found = FALSE; + found = false; } } break; } if( !found ) warn_msg( WarnLogic, "Could not parse MIDL option: %s", option ); - return TRUE; + return true; } // VCLibrarianTool -------------------------------------------------- @@ -1877,8 +1877,8 @@ TQTextStream &operator<<( TQTextStream &strm, const VCConfiguration &tool ) VCFilter::VCFilter() : ParseFiles( unset ) { - useCustomBuildTool = FALSE; - useCompilerTool = FALSE; + useCustomBuildTool = false; + useCompilerTool = false; } void VCFilter::addMOCstage( TQTextStream & /*strm*/, TQString filename ) @@ -1899,7 +1899,7 @@ void VCFilter::addMOCstage( TQTextStream & /*strm*/, TQString filename ) return; CustomBuildTool = VCCustomBuildTool(); - useCustomBuildTool = TRUE; + useCustomBuildTool = true; CustomBuildTool.Description = "Moc'ing " + filename + "..."; CustomBuildTool.CommandLine += (mocApp + " " + filename + " -o " + mocOutput); @@ -1912,7 +1912,7 @@ void VCFilter::addMOCstage( TQTextStream & /*strm*/, TQString filename ) void VCFilter::addUICstage( TQTextStream & /*strm*/, TQString str ) { CustomBuildTool = VCCustomBuildTool(); - useCustomBuildTool = TRUE; + useCustomBuildTool = true; TQString uicApp = Project->var("QMAKE_UIC"); TQString mocApp = Project->var( "QMAKE_MOC" ); @@ -1972,7 +1972,7 @@ void VCFilter::modifyPCHstage( TQTextStream &/*strm*/, TQString str ) return; CompilerTool = VCCLCompilerTool(); - useCompilerTool = TRUE; + useCompilerTool = true; // Unset some default options CompilerTool.BufferSecurityCheck = unset; @@ -1992,23 +1992,23 @@ void VCFilter::modifyPCHstage( TQTextStream &/*strm*/, TQString str ) bool VCFilter::addIMGstage( TQTextStream &/*strm*/, TQString str ) { - bool isCorH = FALSE; + bool isCorH = false; if (str.endsWith(".c") || str.endsWith(".rc")) - isCorH = TRUE; + isCorH = true; TQStringList::Iterator it; for(it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) if(str.endsWith(*it)) - isCorH = TRUE; + isCorH = true; for(it = Option::h_ext.begin(); it != Option::h_ext.end(); ++it) if(str.endsWith(*it)) - isCorH = TRUE; + isCorH = true; TQString collectionName = Project->project->first("QMAKE_IMAGE_COLLECTION"); if (str.isEmpty() || isCorH || collectionName.isEmpty()) - return FALSE; + return false; CustomBuildTool = VCCustomBuildTool(); - useCustomBuildTool = TRUE; + useCustomBuildTool = true; // Some projects (like designer core) may have too many images to // call uic directly. Therefor we have to create a temporary @@ -2016,7 +2016,7 @@ bool VCFilter::addIMGstage( TQTextStream &/*strm*/, TQString str ) TQString tmpFileCmd = "echo "; TQString tmpImageFilename = ".imgcol"; TQStringList& list = Project->project->variables()["IMAGES"]; - bool firstOutput = TRUE; + bool firstOutput = true; it = list.begin(); while( it!=list.end() ) { tmpFileCmd += (*it) + " "; @@ -2026,7 +2026,7 @@ bool VCFilter::addIMGstage( TQTextStream &/*strm*/, TQString str ) + (firstOutput?"> ":">> ") + tmpImageFilename; tmpFileCmd = "echo "; - firstOutput = FALSE; + firstOutput = false; } } @@ -2056,14 +2056,14 @@ bool VCFilter::addIMGstage( TQTextStream &/*strm*/, TQString str ) CustomBuildTool.AdditionalDependencies += list; CustomBuildTool.Outputs = collectionName; CustomBuildTool.Outputs += tmpImageFilename; - return TRUE; + return true; } bool VCFilter::addLexYaccStage( TQTextStream &/*strm*/, TQString str ) { bool doLex = str.endsWith(".l"); if (!doLex && !str.endsWith(".y")) - return FALSE; + return false; TQString fname = "$(InputName)"; if (doLex) { @@ -2090,8 +2090,8 @@ bool VCFilter::addLexYaccStage( TQTextStream &/*strm*/, TQString str ) CustomBuildTool.CommandLine += "move y.tab.c " + fname + Option::cpp_ext.first(); CustomBuildTool.Outputs += fname + Option::cpp_ext.first(); } - useCustomBuildTool = TRUE; - return TRUE; + useCustomBuildTool = true; + return true; } TQTextStream &operator<<( TQTextStream &strm, VCFilter &tool ) @@ -2105,7 +2105,7 @@ TQTextStream &operator<<( TQTextStream &strm, VCFilter &tool ) strm << SPair( _Filter, tool.Filter ); strm << ">"; - bool resourceBuild = FALSE; + bool resourceBuild = false; int currentLevels = 0; TQStringList currentDirs; for ( TQStringList::ConstIterator it = tool.Files.begin(); it != tool.Files.end(); ++it ) { @@ -2137,8 +2137,8 @@ TQTextStream &operator<<( TQTextStream &strm, VCFilter &tool ) currentLevels = int(newDirs.count()); } - tool.useCustomBuildTool = FALSE; - tool.useCompilerTool = FALSE; + tool.useCustomBuildTool = false; + tool.useCompilerTool = false; // Add UIC, MOC and PCH stages to file if ( tool.CustomBuild == moc ) tool.addMOCstage( strm, *it ); diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index 13b928974..b1721ae1e 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -605,7 +605,7 @@ public: // Functions VCLibrarianTool(); virtual ~VCLibrarianTool(){} - bool parseOption( const char* ){ return FALSE; }; + bool parseOption( const char* ){ return false; }; // Variables TQStringList AdditionalDependencies; @@ -626,7 +626,7 @@ public: // Functions VCCustomBuildTool(); virtual ~VCCustomBuildTool(){} - bool parseOption( const char* ){ return FALSE; }; + bool parseOption( const char* ){ return false; }; // Variables TQStringList AdditionalDependencies; @@ -643,7 +643,7 @@ public: // Functions VCResourceCompilerTool(); virtual ~VCResourceCompilerTool(){} - bool parseOption( const char* ){ return FALSE; }; + bool parseOption( const char* ){ return false; }; // Variables TQStringList AdditionalIncludeDirectories; @@ -663,7 +663,7 @@ protected: // Functions VCEventTool() : ExcludedFromBuild( unset ){}; virtual ~VCEventTool(){} - bool parseOption( const char* ){ return FALSE; }; + bool parseOption( const char* ){ return false; }; public: // Variables diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 999b05f04..0127acefd 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -170,7 +170,7 @@ const char* _slnExtSections = "\n\tGlobalSection(ExtensibilityGlobals) = postSol "\n\tEndGlobalSection"; // ------------------------------------------------------------------ -VcprojGenerator::VcprojGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE) +VcprojGenerator::VcprojGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(false) { } @@ -185,7 +185,7 @@ bool VcprojGenerator::writeMakefile(TQTextStream &t) if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n", var("QMAKE_FAILED_REQUIREMENTS").latin1()); - return TRUE; + return true; } // Generate project file @@ -193,15 +193,15 @@ bool VcprojGenerator::writeMakefile(TQTextStream &t) project->first("TEMPLATE") == "vclib") { debug_msg(1, "Generator: MSVC.NET: Writing project file" ); t << vcProject; - return TRUE; + return true; } // Generate solution file else if(project->first("TEMPLATE") == "vcsubdirs") { debug_msg(1, "Generator: MSVC.NET: Writing solution file" ); writeSubDirs(t); - return TRUE; + return true; } - return FALSE; + return false; } @@ -215,7 +215,7 @@ struct VcsolutionDepend { TQUuid VcprojGenerator::getProjectUUID(const TQString &filename) { - bool validUUID = TRUE; + bool validUUID = true; // Read GUID from variable-space TQUuid uuid = project->first("GUID"); @@ -295,14 +295,14 @@ void VcprojGenerator::writeSubDirs(TQTextStream &t) TQDict<VcsolutionDepend> solution_depends; TQPtrList<VcsolutionDepend> solution_cleanup; - solution_cleanup.setAutoDelete(TRUE); + solution_cleanup.setAutoDelete(true); TQStringList subdirs = project->variables()["SUBDIRS"]; TQString oldpwd = TQDir::currentDirPath(); for(TQStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it) { - TQFileInfo fi(Option::fixPathToLocalOS((*it), TRUE)); + TQFileInfo fi(Option::fixPathToLocalOS((*it), true)); if(fi.exists()) { if(fi.isDir()) { TQString profile = (*it); @@ -324,7 +324,7 @@ void VcprojGenerator::writeSubDirs(TQTextStream &t) // Initialize a 'fake' project to get the correct variables // and to be able to extract all the dependencies VcprojGenerator tmp_vcproj(&tmp_proj); - tmp_vcproj.setNoIO(TRUE); + tmp_vcproj.setNoIO(true); tmp_vcproj.init(); if(Option::debug_level) { TQMap<TQString, TQStringList> &vars = tmp_proj.variables(); @@ -447,7 +447,7 @@ void VcprojGenerator::init() if( init_flag ) return; if(project->first("TEMPLATE") == "vcsubdirs") { //too much work for subdirs - init_flag = TRUE; + init_flag = true; return; } @@ -881,9 +881,9 @@ inline bool XLessThanY( TQString &x, TQString &y, bool flat_mode ) ySlashPos = y.find('\\', yPos); if (xSlashPos == -1 && ySlashPos != -1) { - return FALSE; + return false; } else if (xSlashPos != -1 && ySlashPos == -1) { - return TRUE; + return true; } else if (xSlashPos == -1 /* && yySlashPos == -1 */) { TQString subX = x.mid(xPos); TQString subY = y.mid(yPos); @@ -898,7 +898,7 @@ inline bool XLessThanY( TQString &x, TQString &y, bool flat_mode ) xPos = xSlashPos + 1; yPos = ySlashPos + 1; } - return FALSE; + return false; } void nonflatDir_BubbleSort( TQStringList& list, bool flat_mode ) { @@ -909,7 +909,7 @@ void nonflatDir_BubbleSort( TQStringList& list, bool flat_mode ) if ( last == b ) // shortcut return; while( b != last ) {// sort them - bool swapped = FALSE; + bool swapped = false; TQStringList::Iterator swap_pos = b; TQStringList::Iterator x = e; TQStringList::Iterator y = x; @@ -919,7 +919,7 @@ void nonflatDir_BubbleSort( TQStringList& list, bool flat_mode ) --x; --y; if ( XLessThanY(*x,*y, flat_mode) ) { - swapped = TRUE; + swapped = true; swap_str = (*x); // Swap ------- (*x) = (*y); (*y) = swap_str; // ------------ @@ -1063,7 +1063,7 @@ void VcprojGenerator::initOld() if( init_flag ) return; - init_flag = TRUE; + init_flag = true; TQStringList::Iterator it; if ( project->isActiveConfig("stl") ) { @@ -1253,7 +1253,7 @@ void VcprojGenerator::initOld() // MOC ----------------------------------------------------------- if ( project->isActiveConfig("moc") ) - setMocAware(TRUE); + setMocAware(true); // /VERSION:x.yz ------------------------------------------------- if ( !project->variables()["VERSION"].isEmpty() ) { @@ -1289,7 +1289,7 @@ void VcprojGenerator::initOld() for(it = l.begin(); it != l.end(); ++it) { TQStringList &gdmf = project->variables()[(*it)]; for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) - (*inner) = Option::fixPathToTargetOS((*inner), FALSE); + (*inner) = Option::fixPathToTargetOS((*inner), false); } // Get filename w/o extention ----------------------------------- diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index 9e5488045..5e37308c1 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -65,7 +65,7 @@ public: ~VcprojGenerator(); TQString defaultMakefile() const; - virtual bool doDepends() const { return FALSE; } //never necesary + virtual bool doDepends() const { return false; } //never necesary TQString precompH, precompHFilename, precompObj, precompPch; bool usePCH; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 872d0fb1c..408beade9 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -259,7 +259,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t) int Win32MakefileGenerator::findHighestVersion(const TQString &d, const TQString &stem) { - TQString bd = Option::fixPathToLocalOS(d, TRUE); + TQString bd = Option::fixPathToLocalOS(d, true); if(!TQFile::exists(bd)) return -1; if(!project->variables()["QMAKE_" + stem.upper() + "_VERSION_OVERRIDE"].isEmpty()) @@ -269,7 +269,7 @@ Win32MakefileGenerator::findHighestVersion(const TQString &d, const TQString &st int biggest=-1; TQStringList entries = dir.entryList(); TQString dllStem = stem + TQTDLL_POSTFIX; - TQRegExp regx( "(" + dllStem + "([0-9]*)).lib", FALSE ); + TQRegExp regx( "(" + dllStem + "([0-9]*)).lib", false ); for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { if(regx.exactMatch((*it))) biggest = TQMAX(biggest, (regx.cap(1) == dllStem || @@ -334,10 +334,10 @@ Win32MakefileGenerator::findLibraries(const TQString &where) dirs.append(new MakefileDependDir(r.replace("\"",""), l.replace("\"",""))); } } - dirs.setAutoDelete(TRUE); + dirs.setAutoDelete(true); for(TQStringList::Iterator it = l.begin(); it != l.end(); ) { TQChar quote; - bool modified_opt = FALSE, remove = FALSE; + bool modified_opt = false, remove = false; TQString opt = (*it).stripWhiteSpace(); if((opt[0] == '\'' || opt[0] == '"') && opt[(int)opt.length()-1] == opt[0]) { quote = opt[0]; @@ -351,7 +351,7 @@ Win32MakefileGenerator::findLibraries(const TQString &where) TQString r = opt.mid(2), l = Option::fixPathToLocalOS(r); dirs.append(new MakefileDependDir(r.replace("\"",""), l.replace("\"",""))); - remove = TRUE; //we eat this switch + 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()) { @@ -369,9 +369,9 @@ Win32MakefileGenerator::findLibraries(const TQString &where) } } if(out.isEmpty()) { - remove = TRUE; //just eat it since we cannot find one.. + remove = true; //just eat it since we cannot find one.. } else { - modified_opt = TRUE; + modified_opt = true; (*it) = out; } } else if(!TQFile::exists(Option::fixPathToLocalOS(opt))) { @@ -405,7 +405,7 @@ Win32MakefileGenerator::findLibraries(const TQString &where) dir += Option::dir_sep; lib_tmpl.prepend(dir); } - modified_opt = TRUE; + modified_opt = true; (*it) = lib_tmpl; break; } @@ -423,7 +423,7 @@ Win32MakefileGenerator::findLibraries(const TQString &where) ++it; } } - return TRUE; + return true; } void @@ -431,7 +431,7 @@ Win32MakefileGenerator::processPrlFiles() { TQDict<void> processed; TQPtrList<MakefileDependDir> libdirs; - libdirs.setAutoDelete(TRUE); + libdirs.setAutoDelete(true); { TQStringList &libpaths = project->variables()["QMAKE_LIBDIR"]; for(TQStringList::Iterator libpathit = libpaths.begin(); libpathit != libpaths.end(); ++libpathit) { @@ -441,7 +441,7 @@ Win32MakefileGenerator::processPrlFiles() l.replace("\"",""))); } } - for(bool ret = FALSE; TRUE; ret = FALSE) { + for(bool ret = false; true; ret = false) { //read in any prl files included.. TQStringList l_out; TQString where = "QMAKE_LIBS"; @@ -461,7 +461,7 @@ Win32MakefileGenerator::processPrlFiles() if(!processed[opt]) { if(processPrlFile(opt)) { processed.insert(opt, (void*)1); - ret = TRUE; + ret = true; } else { for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) { TQString prl = mdd->local_dir + Option::dir_sep + opt; @@ -469,7 +469,7 @@ Win32MakefileGenerator::processPrlFiles() break; } else if(processPrlFile(prl)) { processed.insert(prl, (void*)1); - ret = TRUE; + ret = true; break; } } |
