diff options
author | Lars Knoll <lars.knoll@qt.io> | 2019-04-30 12:51:36 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-05-02 11:52:02 +0000 |
commit | 343528841e72adf36a37d9afd7260e260a9342eb (patch) | |
tree | 399c295e0e08975106c12c7ef7deecd73436cf66 /qmake | |
parent | 185ba7f4cfd577189f9d8b9d55d7f9ae467055d3 (diff) |
Prefix textstream operators with Qt::
As the non prefixed variants are deprecated
Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 28 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 156 | ||||
-rw-r--r-- | qmake/generators/projectgenerator.cpp | 14 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 160 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 24 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 12 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 2 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 108 | ||||
-rw-r--r-- | qmake/generators/xmloutput.cpp | 6 |
9 files changed, 255 insertions, 255 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 07832041a7..3bed28afdf 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -541,7 +541,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData()); QTextStream mkt(&mkf); writeHeader(mkt); - mkt << "QMAKE = " << var("QMAKE_QMAKE") << endl; + mkt << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl; project->values("QMAKE_MAKE_QMAKE_EXTRA_COMMANDS") << "@echo 'warning: Xcode project has been regenerated, custom settings have been lost. " \ "Use CONFIG+=no_autoqmake to prevent this behavior in the future, " \ @@ -740,15 +740,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData()); QTextStream mkt(&mkf); writeHeader(mkt); - mkt << "MOC = " << var("QMAKE_MOC") << endl; - mkt << "UIC = " << var("QMAKE_UIC") << endl; - mkt << "LEX = " << var("QMAKE_LEX") << endl; - mkt << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl; - mkt << "YACC = " << var("QMAKE_YACC") << endl; - mkt << "YACCFLAGS = " << var("QMAKE_YACCFLAGS") << endl; + mkt << "MOC = " << var("QMAKE_MOC") << Qt::endl; + mkt << "UIC = " << var("QMAKE_UIC") << Qt::endl; + mkt << "LEX = " << var("QMAKE_LEX") << Qt::endl; + mkt << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << Qt::endl; + mkt << "YACC = " << var("QMAKE_YACC") << Qt::endl; + mkt << "YACCFLAGS = " << var("QMAKE_YACCFLAGS") << Qt::endl; mkt << "DEFINES = " << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") - << varGlue("DEFINES","-D"," -D","") << endl; + << varGlue("DEFINES","-D"," -D","") << Qt::endl; mkt << "INCPATH ="; { const ProStringList &incs = project->values("INCLUDEPATH"); @@ -757,9 +757,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS")) mkt << " " << var("QMAKE_FRAMEWORKPATH_FLAGS"); - mkt << endl; - mkt << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; - mkt << "MOVE = " << var("QMAKE_MOVE") << endl << endl; + mkt << Qt::endl; + mkt << "DEL_FILE = " << var("QMAKE_DEL_FILE") << Qt::endl; + mkt << "MOVE = " << var("QMAKE_MOVE") << Qt::endl << Qt::endl; mkt << "preprocess: compilers\n"; mkt << "clean preprocess_clean: compiler_clean\n\n"; writeExtraTargets(mkt); @@ -789,7 +789,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } } } - mkt << endl; + mkt << Qt::endl; writeExtraCompilerTargets(mkt); writingUnixMakefileGenerator = false; } @@ -994,12 +994,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) tmp = project->values("SUBLIBS"); for(int i = 0; i < tmp.count(); i++) t << escapeFilePath("tmp/lib" + tmp[i] + ".a") << ' '; - t << endl << endl; + t << Qt::endl << Qt::endl; mkt << "sublibs: $(SUBLIBS)\n\n"; tmp = project->values("SUBLIBS"); for(int i = 0; i < tmp.count(); i++) t << escapeFilePath("tmp/lib" + tmp[i] + ".a") + ":\n\t" - << var(ProKey("MAKELIB" + tmp[i])) << endl << endl; + << var(ProKey("MAKELIB" + tmp[i])) << Qt::endl << Qt::endl; mkt.flush(); mkf.close(); writingUnixMakefileGenerator = false; diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index b634ec622b..aae5a44e21 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -994,25 +994,25 @@ MakefileGenerator::writePrlFile(QTextStream &t) QString bdir = Option::output_dir; if(bdir.isEmpty()) bdir = qmake_getpwd(); - t << "QMAKE_PRL_BUILD_DIR =" << qv(bdir) << endl; + t << "QMAKE_PRL_BUILD_DIR =" << qv(bdir) << Qt::endl; - t << "QMAKE_PRO_INPUT =" << qv(project->projectFile().section('/', -1)) << endl; + t << "QMAKE_PRO_INPUT =" << qv(project->projectFile().section('/', -1)) << Qt::endl; if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH")) - t << "QMAKE_PRL_SOURCE_DIR =" << qv(project->first("QMAKE_ABSOLUTE_SOURCE_PATH")) << endl; - t << "QMAKE_PRL_TARGET =" << qv(project->first("LIB_TARGET")) << endl; + t << "QMAKE_PRL_SOURCE_DIR =" << qv(project->first("QMAKE_ABSOLUTE_SOURCE_PATH")) << Qt::endl; + t << "QMAKE_PRL_TARGET =" << qv(project->first("LIB_TARGET")) << Qt::endl; if(!project->isEmpty("PRL_EXPORT_DEFINES")) - t << "QMAKE_PRL_DEFINES =" << qv(project->values("PRL_EXPORT_DEFINES")) << endl; + t << "QMAKE_PRL_DEFINES =" << qv(project->values("PRL_EXPORT_DEFINES")) << Qt::endl; if(!project->isEmpty("PRL_EXPORT_CFLAGS")) - t << "QMAKE_PRL_CFLAGS =" << qv(project->values("PRL_EXPORT_CFLAGS")) << endl; + t << "QMAKE_PRL_CFLAGS =" << qv(project->values("PRL_EXPORT_CFLAGS")) << Qt::endl; if(!project->isEmpty("PRL_EXPORT_CXXFLAGS")) - t << "QMAKE_PRL_CXXFLAGS =" << qv(project->values("PRL_EXPORT_CXXFLAGS")) << endl; + t << "QMAKE_PRL_CXXFLAGS =" << qv(project->values("PRL_EXPORT_CXXFLAGS")) << Qt::endl; if(!project->isEmpty("CONFIG")) - t << "QMAKE_PRL_CONFIG =" << qv(project->values("CONFIG")) << endl; + t << "QMAKE_PRL_CONFIG =" << qv(project->values("CONFIG")) << Qt::endl; if(!project->isEmpty("TARGET_VERSION_EXT")) - t << "QMAKE_PRL_VERSION = " << project->first("TARGET_VERSION_EXT") << endl; + t << "QMAKE_PRL_VERSION = " << project->first("TARGET_VERSION_EXT") << Qt::endl; else if(!project->isEmpty("VERSION")) - t << "QMAKE_PRL_VERSION = " << project->first("VERSION") << endl; + t << "QMAKE_PRL_VERSION = " << project->first("VERSION") << Qt::endl; if(project->isActiveConfig("staticlib") || project->isActiveConfig("explicitlib")) { ProStringList libs; if (!project->isActiveConfig("staticlib")) @@ -1022,7 +1022,7 @@ MakefileGenerator::writePrlFile(QTextStream &t) t << "QMAKE_PRL_LIBS ="; for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) t << qv(project->values((*it).toKey())); - t << endl; + t << Qt::endl; } } @@ -1055,15 +1055,15 @@ MakefileGenerator::writeProjectMakefile() t << "install: "; for(it = targets.begin(); it != targets.end(); ++it) t << (*it)->target << "-install "; - t << endl; + t << Qt::endl; //uninstall t << "uninstall: "; for(it = targets.begin(); it != targets.end(); ++it) t << (*it)->target << "-uninstall "; - t << endl; + t << Qt::endl; } else { - t << "first: " << targets.first()->target << endl + t << "first: " << targets.first()->target << Qt::endl << "install: " << targets.first()->target << "-install\n" << "uninstall: " << targets.first()->target << "-uninstall\n"; } @@ -1072,7 +1072,7 @@ MakefileGenerator::writeProjectMakefile() if(!project->isActiveConfig("no_autoqmake")) { QString mkf = escapeDependencyPath(fileFixify(Option::output.fileName())); for(QList<SubTarget*>::Iterator it = targets.begin(); it != targets.end(); ++it) - t << escapeDependencyPath((*it)->makefile) << ": " << mkf << endl; + t << escapeDependencyPath((*it)->makefile) << ": " << mkf << Qt::endl; } qDeleteAll(targets); return true; @@ -1186,7 +1186,7 @@ MakefileGenerator::writeObj(QTextStream &t, const char *src) p.replace(stringObj, escapeFilePath(dstf)); t << "\n\t" << p; } - t << endl << endl; + t << Qt::endl << Qt::endl; } } @@ -1380,14 +1380,14 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) QString tmp_dst = fileFixify((*pit).toQString(), FileFixifyAbsolute, false); t << mkdir_p_asstring(filePrefixRoot(root, tmp_dst)) << "\n\t"; } - t << target << endl << endl; + t << target << Qt::endl << Qt::endl; if(!uninst.isEmpty()) { t << "uninstall_" << (*it) << ": FORCE"; for (int i = uninst.size(); --i >= 0; ) t << "\n\t" << uninst.at(i); t << "\n\t-$(DEL_DIR) " << escapeFilePath(filePrefixRoot(root, dst)) << " \n\n"; } - t << endl; + t << Qt::endl; if (installConfigValues.indexOf("no_default_install") == -1) { all_installs += QString("install_") + (*it) + " "; @@ -1824,7 +1824,7 @@ MakefileGenerator::writeExtraTargets(QTextStream &t) t << escapeDependencyPath(targ) << ":" << deps; if(!cmd.isEmpty()) t << "\n\t" << cmd; - t << endl << endl; + t << Qt::endl << Qt::endl; } } @@ -1916,7 +1916,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) FileFixifyFromOutdir)); } } - t << endl; + t << Qt::endl; if (config.indexOf("no_clean") == -1) { QStringList raw_clean = project->values(ProKey(*it + ".clean")).toQStringList(); @@ -1981,7 +1981,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } } } - t << endl; + t << Qt::endl; } QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList(); if (config.indexOf("combine") != -1) { @@ -2065,7 +2065,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } else { t << " " << valList(escapeDependencyPaths(inputs)) << " " << valList(finalizeDependencyPaths(deps)); } - t << "\n\t" << cmd << endl << endl; + t << "\n\t" << cmd << Qt::endl << Qt::endl; continue; } for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) { @@ -2177,10 +2177,10 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) ++i; } t << escapeDependencyPath(out) << ": " << valList(finalizeDependencyPaths(deps)) << "\n\t" - << cmd << endl << endl; + << cmd << Qt::endl << Qt::endl; } } - t << "compiler_clean: " << clean_targets << endl << endl; + t << "compiler_clean: " << clean_targets << Qt::endl << Qt::endl; } void @@ -2196,17 +2196,17 @@ MakefileGenerator::writeExtraCompilerVariables(QTextStream &t) first = false; } t << "QMAKE_COMP_" << (*varit) << " = " - << valList(project->values((*varit).toKey())) << endl; + << valList(project->values((*varit).toKey())) << Qt::endl; } } if(!first) - t << endl; + t << Qt::endl; } void MakefileGenerator::writeExtraVariables(QTextStream &t) { - t << endl; + t << Qt::endl; ProStringList outlist; const ProValueMap &vars = project->variables(); @@ -2220,7 +2220,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t) } if (!outlist.isEmpty()) { t << "####### Custom Variables\n"; - t << outlist.join('\n') << endl << endl; + t << outlist.join('\n') << Qt::endl << Qt::endl; } } @@ -2236,11 +2236,11 @@ MakefileGenerator::writeExportedVariables(QTextStream &t) const ProString &name = project->first(ProKey(exp + ".name")); const ProString &value = project->first(ProKey(exp + ".value")); if (!value.isEmpty()) - t << name << " = " << value << endl; + t << name << " = " << value << Qt::endl; else t << name << " =\n"; } - t << endl; + t << Qt::endl; } bool @@ -2248,7 +2248,7 @@ MakefileGenerator::writeDummyMakefile(QTextStream &t) { if (project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) return false; - t << "QMAKE = " << var("QMAKE_QMAKE") << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl; const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; @@ -2264,7 +2264,7 @@ MakefileGenerator::writeDummyMakefile(QTextStream &t) bool MakefileGenerator::writeStubMakefile(QTextStream &t) { - t << "QMAKE = " << var("QMAKE_QMAKE") << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl; const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; @@ -2293,22 +2293,22 @@ MakefileGenerator::writeMakefile(QTextStream &t) void MakefileGenerator::writeDefaultVariables(QTextStream &t) { - t << "QMAKE = " << var("QMAKE_QMAKE") << endl; - t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; - t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; - t << "MKDIR = " << var("QMAKE_MKDIR") << endl; - t << "COPY = " << var("QMAKE_COPY") << endl; - t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << endl; - t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; - t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl; - t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl; - t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; - t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << endl; - t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << endl; - t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; - t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; - t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; - t << "MOVE = " << var("QMAKE_MOVE") << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl; + t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << Qt::endl; + t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << Qt::endl; + t << "MKDIR = " << var("QMAKE_MKDIR") << Qt::endl; + t << "COPY = " << var("QMAKE_COPY") << Qt::endl; + t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << Qt::endl; + t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << Qt::endl; + t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << Qt::endl; + t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << Qt::endl; + t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << Qt::endl; + t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << Qt::endl; + t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << Qt::endl; + t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << Qt::endl; + t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << Qt::endl; + t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << Qt::endl; + t << "MOVE = " << var("QMAKE_MOVE") << Qt::endl; } QString MakefileGenerator::buildArgs(bool withExtra) @@ -2349,18 +2349,18 @@ void MakefileGenerator::writeHeader(QTextStream &t) { t << "#############################################################################\n"; - t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << endl; + t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << Qt::endl; t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ")\n"; - t << "# Project: " << fileFixify(project->projectFile()) << endl; - t << "# Template: " << var("TEMPLATE") << endl; + t << "# Project: " << fileFixify(project->projectFile()) << Qt::endl; + t << "# Template: " << var("TEMPLATE") << Qt::endl; if(!project->isActiveConfig("build_pass")) - t << "# Command: " << build_args().replace(QLatin1String("$(QMAKE)"), var("QMAKE_QMAKE")) << endl; + t << "# Command: " << build_args().replace(QLatin1String("$(QMAKE)"), var("QMAKE_QMAKE")) << Qt::endl; t << "#############################################################################\n"; - t << endl; + t << Qt::endl; QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); if (ofile.lastIndexOf(Option::dir_sep) != -1) ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1); - t << "MAKEFILE = " << escapeFilePath(ofile) << endl << endl; + t << "MAKEFILE = " << escapeFilePath(ofile) << Qt::endl << Qt::endl; t << "EQ = =\n\n"; } @@ -2492,7 +2492,7 @@ MakefileGenerator::writeSubDirs(QTextStream &t) void MakefileGenerator::writeSubMakeCall(QTextStream &t, const QString &callPrefix, const QString &makeArguments) { - t << callPrefix << "$(MAKE)" << makeArguments << endl; + t << callPrefix << "$(MAKE)" << makeArguments << Qt::endl; } void @@ -2517,14 +2517,14 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT // blasted includes const ProStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES"); for (ProStringList::ConstIterator qeui_it = qeui.begin(); qeui_it != qeui.end(); ++qeui_it) - t << "include " << (*qeui_it) << endl; + t << "include " << (*qeui_it) << Qt::endl; if (!(flags & SubTargetSkipDefaultVariables)) { writeDefaultVariables(t); t << "SUBTARGETS = "; // subtargets are sub-directory for(int target = 0; target < targets.size(); ++target) t << " \\\n\t\t" << targets.at(target)->target; - t << endl << endl; + t << Qt::endl << Qt::endl; } writeExtraVariables(t); @@ -2580,7 +2580,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT if (!dont_recurse) writeSubMakeCall(t, out_directory_cdin, makefilein + " qmake_all"); else - t << endl; + t << Qt::endl; } { //actually compile @@ -2621,7 +2621,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT out_directory_cdin, makefilein + " " + s); } } - t << endl; + t << Qt::endl; if (!(flags & SubTargetSkipDefaultTargets)) { writeMakeQmake(t, true); @@ -2670,7 +2670,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT } else if(suffix == "distclean") { QString ofile = fileFixify(Option::output.fileName()); if(!ofile.isEmpty()) - t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl; + t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << Qt::endl; t << fixFileVarGlue("QMAKE_DISTCLEAN", "\t-$(DEL_FILE) ", " ", "\n"); } } @@ -2683,7 +2683,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT cmd = var(ProKey(*qut_it + ".commands")), deps; if(targ.isEmpty()) targ = (*qut_it).toQString(); - t << endl; + t << Qt::endl; const ProStringList &deplist = project->values(ProKey(*qut_it + ".depends")); for (ProStringList::ConstIterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) { @@ -2758,7 +2758,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT deps += " FORCE"; t << escapeDependencyPath(Option::fixPathToTargetOS(targ, false)) << ":" << deps << "\n"; if(!cmd.isEmpty()) - t << "\t" << cmd << endl; + t << "\t" << cmd << Qt::endl; } if(flags & SubTargetInstalls) { @@ -2776,7 +2776,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) { QStringList files = escapeFilePaths(fileFixify(Option::mkfile::project_files)); t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": \n\t" - << "@$(QMAKE) -prl " << files.join(' ') << ' ' << buildArgs(true) << endl; + << "@$(QMAKE) -prl " << files.join(' ') << ' ' << buildArgs(true) << Qt::endl; } QString qmake = build_args(); @@ -2795,10 +2795,10 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) } const ProStringList &included = escapeDependencyPaths(project->values("QMAKE_INTERNAL_INCLUDED_FILES")); t << included.join(QString(" \\\n\t\t")) << "\n\t" - << qmake << endl; + << qmake << Qt::endl; const ProStringList &extraCommands = project->values("QMAKE_MAKE_QMAKE_EXTRA_COMMANDS"); if (!extraCommands.isEmpty()) - t << "\t" << extraCommands.join(QString("\n\t")) << endl; + t << "\t" << extraCommands.join(QString("\n\t")) << Qt::endl; for(int include = 0; include < included.size(); ++include) { const ProString &i = included.at(include); if(!i.isEmpty()) @@ -2806,7 +2806,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) } } if(project->first("QMAKE_ORIG_TARGET") != "qmake") { - t << "qmake: FORCE\n\t@" << qmake << endl << endl; + t << "qmake: FORCE\n\t@" << qmake << Qt::endl << Qt::endl; if (!noDummyQmakeAll) t << "qmake_all: FORCE\n\n"; } @@ -3298,11 +3298,11 @@ MakefileGenerator::writePkgConfigFile() if(includeDir.isEmpty()) includeDir = prefix + "/include"; - t << "prefix=" << prefix << endl; + t << "prefix=" << prefix << Qt::endl; t << "exec_prefix=${prefix}\n" << "libdir=" << pkgConfigFixPath(libDir) << "\n" - << "includedir=" << pkgConfigFixPath(includeDir) << endl; - t << endl; + << "includedir=" << pkgConfigFixPath(includeDir) << Qt::endl; + t << Qt::endl; //extra PKGCONFIG variables const ProStringList &pkgconfig_vars = project->values("QMAKE_PKGCONFIG_VARIABLES"); @@ -3323,17 +3323,17 @@ MakefileGenerator::writePkgConfigFile() } } if (!val.isEmpty()) - t << var << "=" << val << endl; + t << var << "=" << val << Qt::endl; } - t << endl; + t << Qt::endl; QString name = project->first("QMAKE_PKGCONFIG_NAME").toQString(); if(name.isEmpty()) { name = project->first("QMAKE_ORIG_TARGET").toQString().toLower(); name.replace(0, 1, name[0].toUpper()); } - t << "Name: " << name << endl; + t << "Name: " << name << Qt::endl; QString desc = project->values("QMAKE_PKGCONFIG_DESCRIPTION").join(' '); if(desc.isEmpty()) { if(name.isEmpty()) { @@ -3351,12 +3351,12 @@ MakefileGenerator::writePkgConfigFile() desc += " Application"; } } - t << "Description: " << desc << endl; + t << "Description: " << desc << Qt::endl; ProString version = project->first("QMAKE_PKGCONFIG_VERSION"); if (version.isEmpty()) version = project->first("VERSION"); if (!version.isEmpty()) - t << "Version: " << version << endl; + t << "Version: " << version << Qt::endl; // libs t << "Libs: "; @@ -3393,7 +3393,7 @@ MakefileGenerator::writePkgConfigFile() t << "Libs.private:"; for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it) t << ' ' << fixLibFlags((*it).toKey()).join(' '); - t << endl; + t << Qt::endl; } // flags @@ -3411,15 +3411,15 @@ MakefileGenerator::writePkgConfigFile() && libDir != QLatin1String("/Library/Frameworks")) { t << " -F${libdir}"; } - t << endl; + t << Qt::endl; // requires const QString requires = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' '); if (!requires.isEmpty()) { - t << "Requires: " << requires << endl; + t << "Requires: " << requires << Qt::endl; } - t << endl; + t << Qt::endl; } static QString windowsifyPath(const QString &str) diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index ef34955eb1..f729ec89ef 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp @@ -324,14 +324,14 @@ ProjectGenerator::init() bool ProjectGenerator::writeMakefile(QTextStream &t) { - t << "######################################################################" << endl; - t << "# Automatically generated by qmake (" QMAKE_VERSION_STR ") " << QDateTime::currentDateTime().toString() << endl; - t << "######################################################################" << endl << endl; + t << "######################################################################" << Qt::endl; + t << "# Automatically generated by qmake (" QMAKE_VERSION_STR ") " << QDateTime::currentDateTime().toString() << Qt::endl; + t << "######################################################################" << Qt::endl << Qt::endl; if (!Option::globals->extra_cmds[QMakeEvalBefore].isEmpty()) - t << Option::globals->extra_cmds[QMakeEvalBefore] << endl; + t << Option::globals->extra_cmds[QMakeEvalBefore] << Qt::endl; t << getWritableVar("TEMPLATE_ASSIGN", false); if(project->first("TEMPLATE_ASSIGN") == "subdirs") { - t << endl << "# Directories" << "\n" + t << Qt::endl << "# Directories" << "\n" << getWritableVar("SUBDIRS"); } else { //figure out target @@ -343,7 +343,7 @@ ProjectGenerator::writeMakefile(QTextStream &t) t << getWritableVar("TARGET_ASSIGN") << getWritableVar("CONFIG", false) << getWritableVar("CONFIG_REMOVE", false) - << getWritableVar("INCLUDEPATH") << endl; + << getWritableVar("INCLUDEPATH") << Qt::endl; t << "# You can make your code fail to compile if you use deprecated APIs.\n" "# In order to do so, uncomment the following line.\n" @@ -362,7 +362,7 @@ ProjectGenerator::writeMakefile(QTextStream &t) << getWritableVar("TRANSLATIONS"); } if (!Option::globals->extra_cmds[QMakeEvalAfter].isEmpty()) - t << Option::globals->extra_cmds[QMakeEvalAfter] << endl; + t << Option::globals->extra_cmds[QMakeEvalAfter] << Qt::endl; return true; } diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 7d8c70ec3b..a384439aac 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -83,8 +83,8 @@ void UnixMakefileGenerator::writeDefaultVariables(QTextStream &t) { MakefileGenerator::writeDefaultVariables(t); - t << "TAR = " << var("QMAKE_TAR") << endl; - t << "COMPRESS = " << var("QMAKE_GZIP") << endl; + t << "TAR = " << var("QMAKE_TAR") << Qt::endl; + t << "COMPRESS = " << var("QMAKE_GZIP") << Qt::endl; if (project->isEmpty("QMAKE_DISTNAME")) { ProString distname = project->first("QMAKE_ORIG_TARGET"); @@ -92,13 +92,13 @@ UnixMakefileGenerator::writeDefaultVariables(QTextStream &t) distname += project->first("VERSION"); project->values("QMAKE_DISTNAME") = distname; } - t << "DISTNAME = " << fileVar("QMAKE_DISTNAME") << endl; + t << "DISTNAME = " << fileVar("QMAKE_DISTNAME") << Qt::endl; if (project->isEmpty("QMAKE_DISTDIR")) project->values("QMAKE_DISTDIR") = project->first("QMAKE_DISTNAME"); t << "DISTDIR = " << escapeFilePath(fileFixify( (project->isEmpty("OBJECTS_DIR") ? ProString(".tmp/") : project->first("OBJECTS_DIR")) + project->first("QMAKE_DISTDIR"), - FileFixifyFromOutdir | FileFixifyAbsolute)) << endl; + FileFixifyFromOutdir | FileFixifyAbsolute)) << Qt::endl; } void @@ -106,10 +106,10 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator:: { MakefileGenerator::writeSubTargets(t, targets, flags); - t << "dist: distdir FORCE" << endl; + t << "dist: distdir FORCE" << Qt::endl; t << "\t(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar)" " && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)"; - t << endl << endl; + t << Qt::endl << Qt::endl; t << "distdir:"; for (int target = 0; target < targets.size(); ++target) { @@ -118,7 +118,7 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator:: } t << " FORCE\n\t" << mkdir_p_asstring("$(DISTDIR)", false) << "\n\t" - << "$(COPY_FILE) --parents " << fileVar("DISTFILES") << " $(DISTDIR)" << Option::dir_sep << endl << endl; + << "$(COPY_FILE) --parents " << fileVar("DISTFILES") << " $(DISTDIR)" << Option::dir_sep << Qt::endl << Qt::endl; const QString abs_source_path = project->first("QMAKE_ABSOLUTE_SOURCE_PATH").toQString(); for (int target = 0; target < targets.size(); ++target) { @@ -151,7 +151,7 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator:: t << subtarget->target << "-distdir: FORCE"; writeSubTargetCall(t, in_directory, in, out_directory, escapeFilePath(out), out_directory_cdin, makefilein); - t << endl; + t << Qt::endl; } } @@ -183,11 +183,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) writeExportedVariables(t); t << "####### Compiler, tools and options\n\n"; - t << "CC = " << var("QMAKE_CC") << endl; - t << "CXX = " << var("QMAKE_CXX") << endl; + t << "CC = " << var("QMAKE_CC") << Qt::endl; + t << "CXX = " << var("QMAKE_CXX") << Qt::endl; t << "DEFINES = " << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") - << varGlue("DEFINES","-D"," -D","") << endl; + << varGlue("DEFINES","-D"," -D","") << Qt::endl; t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)\n"; t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)\n"; t << "INCPATH ="; @@ -208,38 +208,38 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS")) t << " " << var("QMAKE_FRAMEWORKPATH_FLAGS"); - t << endl; + t << Qt::endl; writeDefaultVariables(t); if(!project->isActiveConfig("staticlib")) { - t << "LINK = " << var("QMAKE_LINK") << endl; - t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl; + t << "LINK = " << var("QMAKE_LINK") << Qt::endl; + t << "LFLAGS = " << var("QMAKE_LFLAGS") << Qt::endl; t << "LIBS = $(SUBLIBS) " << fixLibFlags("LIBS").join(' ') << ' ' << fixLibFlags("LIBS_PRIVATE").join(' ') << ' ' << fixLibFlags("QMAKE_LIBS").join(' ') << ' ' - << fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl; + << fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << Qt::endl; } - t << "AR = " << var("QMAKE_AR") << endl; - t << "RANLIB = " << var("QMAKE_RANLIB") << endl; - t << "SED = " << var("QMAKE_STREAM_EDITOR") << endl; - t << "STRIP = " << var("QMAKE_STRIP") << endl; + t << "AR = " << var("QMAKE_AR") << Qt::endl; + t << "RANLIB = " << var("QMAKE_RANLIB") << Qt::endl; + t << "SED = " << var("QMAKE_STREAM_EDITOR") << Qt::endl; + t << "STRIP = " << var("QMAKE_STRIP") << Qt::endl; - t << endl; + t << Qt::endl; t << "####### Output directory\n\n"; // This is used in commands by some .prf files. if (! project->values("OBJECTS_DIR").isEmpty()) - t << "OBJECTS_DIR = " << fileVar("OBJECTS_DIR") << endl; + t << "OBJECTS_DIR = " << fileVar("OBJECTS_DIR") << Qt::endl; else t << "OBJECTS_DIR = ./\n"; - t << endl; + t << Qt::endl; /* files */ t << "####### Files\n\n"; // This is used by the dist target. - t << "SOURCES = " << fileVarList("SOURCES") << ' ' << fileVarList("GENERATED_SOURCES") << endl; + t << "SOURCES = " << fileVarList("SOURCES") << ' ' << fileVarList("GENERATED_SOURCES") << Qt::endl; if(do_incremental) { const ProStringList &objs = project->values("OBJECTS"); const ProStringList &incrs = project->values("QMAKE_INCREMENTAL"); @@ -259,59 +259,59 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\\\n\t\t" << (*objit); } if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done! - t << escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << endl; + t << escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << Qt::endl; } else if(!incrs_out.count()) { - t << endl; + t << Qt::endl; } else { src_incremental = true; - t << endl; + t << Qt::endl; t << "INCREMENTAL_OBJECTS = " - << escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << endl; + << escapeFilePaths(incrs_out).join(QString(" \\\n\t\t")) << Qt::endl; } } else { // Used all over the place in both deps and commands. - t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << endl; + t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << Qt::endl; } if(do_incremental && !src_incremental) do_incremental = false; t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " " - << fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl; - t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl; + << fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << Qt::endl; + t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << Qt::endl; QString destd = fileVar("DESTDIR"); // When building on non-MSys MinGW, the path ends with a backslash, which // GNU make will interpret that as a line continuation. Doubling the backslash // avoids the problem, at the cost of the variable containing *both* backslashes. if (destd.endsWith('\\')) destd += '\\'; - t << "DESTDIR = " << destd << endl; - t << "TARGET = " << fileVar("TARGET") << endl; + t << "DESTDIR = " << destd << Qt::endl; + t << "TARGET = " << fileVar("TARGET") << Qt::endl; if(project->isActiveConfig("plugin")) { - t << "TARGETD = " << fileVar("TARGET") << endl; + t << "TARGETD = " << fileVar("TARGET") << Qt::endl; } else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty()) { - t << "TARGETA = " << fileVar("TARGETA") << endl; + t << "TARGETA = " << fileVar("TARGETA") << Qt::endl; if(!project->isEmpty("QMAKE_BUNDLE")) { - t << "TARGETD = " << fileVar("TARGET_x.y") << endl; - t << "TARGET0 = " << fileVar("TARGET_") << endl; + t << "TARGETD = " << fileVar("TARGET_x.y") << Qt::endl; + t << "TARGET0 = " << fileVar("TARGET_") << Qt::endl; } else if (!project->isActiveConfig("unversioned_libname")) { - t << "TARGET0 = " << fileVar("TARGET_") << endl; + t << "TARGET0 = " << fileVar("TARGET_") << Qt::endl; if (project->isEmpty("QMAKE_HPUX_SHLIB")) { - t << "TARGETD = " << fileVar("TARGET_x.y.z") << endl; - t << "TARGET1 = " << fileVar("TARGET_x") << endl; - t << "TARGET2 = " << fileVar("TARGET_x.y") << endl; + t << "TARGETD = " << fileVar("TARGET_x.y.z") << Qt::endl; + t << "TARGET1 = " << fileVar("TARGET_x") << Qt::endl; + t << "TARGET2 = " << fileVar("TARGET_x.y") << Qt::endl; } else { - t << "TARGETD = " << fileVar("TARGET_x") << endl; + t << "TARGETD = " << fileVar("TARGET_x") << Qt::endl; } } } writeExtraCompilerVariables(t); writeExtraVariables(t); - t << endl; + t << Qt::endl; // blasted includes const ProStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES"); ProStringList::ConstIterator it; for(it = qeui.begin(); it != qeui.end(); ++it) - t << "include " << escapeDependencyPath(*it) << endl; + t << "include " << escapeDependencyPath(*it) << Qt::endl; /* rules */ t << "first:" << (!project->isActiveConfig("no_default_goal_deps") ? " all" : "") << "\n"; @@ -321,7 +321,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) ProStringList objects = project->values("OBJECTS"); for (ProStringList::Iterator it = objects.begin(); it != objects.end(); ++it) { QString d_file = (*it).toQString().replace(QRegExp(Option::obj_ext + "$"), ".d"); - t << "-include " << escapeDependencyPath(d_file) << endl; + t << "-include " << escapeDependencyPath(d_file) << Qt::endl; project->values("QMAKE_DISTCLEAN") << d_file; } } else { @@ -379,8 +379,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QStringList deps = findDependencies((*it).toQString()).filter(QRegExp( "((^|/)" + Option::h_moc_mod + "|" + Option::cpp_moc_ext + "$)")); if(!deps.isEmpty()) - t << d_file_d << ": " << finalizeDependencyPaths(deps).join(' ') << endl; - t << "-include " << d_file_d << endl; + t << d_file_d << ": " << finalizeDependencyPaths(deps).join(' ') << Qt::endl; + t << "-include " << d_file_d << Qt::endl; project->values("QMAKE_DISTCLEAN") += d_file; } } @@ -399,7 +399,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it) t << escapeFilePath(libdir + project->first("QMAKE_PREFIX_STATICLIB") + (*it) + '.' + project->first("QMAKE_EXTENSION_STATICLIB")) << ' '; - t << endl << endl; + t << Qt::endl << Qt::endl; } QString target_deps; if ((project->isActiveConfig("depend_prl") || project->isActiveConfig("fast_depend_prl")) @@ -504,7 +504,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "$(LINK) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)"; if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); - t << endl << endl; + t << Qt::endl << Qt::endl; } else { t << depVar("TARGET") << ": " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << target_deps << ' ' << depVar("POST_TARGETDEPS") << "\n\t"; @@ -517,7 +517,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); } - t << endl << endl; + t << Qt::endl << Qt::endl; } allDeps = ' ' + depVar("TARGET"); } else if(!project->isActiveConfig("staticlib")) { @@ -548,7 +548,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) //actual target const QString link_deps = "$(OBJECTS) "; t << incr_target_dir_d << ": " << link_deps << "\n\t" - << "ld -r -o " << incr_target_dir_f << ' ' << link_deps << endl; + << "ld -r -o " << incr_target_dir_f << ' ' << link_deps << Qt::endl; //communicated below ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD"); cmd[0] = cmd.at(0).toQString().replace(QLatin1String("$(OBJECTS) "), QLatin1String("$(INCREMENTAL_OBJECTS)")); //ick @@ -606,7 +606,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "-$(MOVE) $(TARGET) " << destdir << "$(TARGET)"; if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); - t << endl << endl; + t << Qt::endl << Qt::endl; } else if(!project->isEmpty("QMAKE_BUNDLE")) { bundledFiles << destdir_r + var("TARGET"); t << "\n\t" @@ -620,7 +620,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) " Versions/Current/$(TARGET) $(DESTDIR)$(TARGET0)") << "\n\t"; if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); - t << endl << endl; + t << Qt::endl << Qt::endl; } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) { t << "\n\t"; @@ -654,7 +654,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); - t << endl << endl; + t << Qt::endl << Qt::endl; } else { t << "\n\t" << "-$(DEL_FILE) $(TARGET) $(TARGET0)\n\t" @@ -668,9 +668,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "-$(MOVE) $(TARGET0) " << destdir << "$(TARGET0)\n\t"; if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); - t << endl << endl; + t << Qt::endl << Qt::endl; } - t << endl << endl; + t << Qt::endl << Qt::endl; if (! project->isActiveConfig("plugin")) { t << "staticlib: " << depVar("TARGETA") << "\n\n"; @@ -688,7 +688,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\n\t" << var("QMAKE_POST_LINK"); if(!project->isEmpty("QMAKE_RANLIB")) t << "\n\t$(RANLIB) $(TARGETA)"; - t << endl << endl; + t << Qt::endl << Qt::endl; } } else { QString destdir_r = project->first("DESTDIR").toQString(); @@ -708,7 +708,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t" << var("QMAKE_POST_LINK") << "\n"; if (!project->isEmpty("QMAKE_RANLIB")) t << "\t$(RANLIB) " << destdir << "$(TARGET)\n"; - t << endl << endl; + t << Qt::endl << Qt::endl; } writeMakeQmake(t); @@ -722,7 +722,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } if(!meta_files.isEmpty()) t << escapeDependencyPaths(meta_files).join(" ") << ": \n\t" - << "@$(QMAKE) -prl " << escapeFilePath(project->projectFile()) << ' ' << buildArgs(true) << endl; + << "@$(QMAKE) -prl " << escapeFilePath(project->projectFile()) << ' ' << buildArgs(true) << Qt::endl; } if (!project->isEmpty("QMAKE_BUNDLE")) { @@ -743,7 +743,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "@echo \"APPL" << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) - << "\" > " << pkginfo_f << endl; + << "\" > " << pkginfo_f << Qt::endl; } if (!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) { ProString resources = project->first("QMAKE_BUNDLE_RESOURCE_FILE"); @@ -852,7 +852,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "-e \"s,\\$${EXECUTABLE_NAME}," << (app_bundle_name.isEmpty() ? app_bundle_name : plugin_bundle_name) << ",g\" " << "-e \"s,@TYPEINFO@,"<< typeInfo << ",g\" " << "-e \"s,\\$${QMAKE_PKGINFO_TYPEINFO},"<< typeInfo << ",g\" " - << "" << info_plist << " >" << info_plist_out << endl; + << "" << info_plist << " >" << info_plist_out << Qt::endl; //copy the icon if (!project->isEmpty("ICON")) { QString dir = bundle_dir + "Contents/Resources/"; @@ -863,7 +863,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << escapeDependencyPath(icon_path) << ": " << escapeDependencyPath(icon) << "\n\t" << mkdir_p_asstring(dir) << "\n\t" << "@$(DEL_FILE) " << icon_path_f << "\n\t" - << "@$(COPY_FILE) " << escapeFilePath(icon) << ' ' << icon_path_f << endl; + << "@$(COPY_FILE) " << escapeFilePath(icon) << ' ' << icon_path_f << Qt::endl; } } else { ProString lib_bundle_name = var("QMAKE_FRAMEWORK_BUNDLE_NAME"); @@ -880,7 +880,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "-e \"s,\\$${EXECUTABLE_NAME}," << lib_bundle_name << ",g\" " << "-e \"s,@TYPEINFO@," << typeInfo << ",g\" " << "-e \"s,\\$${QMAKE_PKGINFO_TYPEINFO}," << typeInfo << ",g\" " - << "" << info_plist << " >" << info_plist_out << endl; + << "" << info_plist << " >" << info_plist_out << Qt::endl; } break; } // project->isActiveConfig("no_plist") @@ -924,10 +924,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QFileInfo fi(fileInfo(fn)); if(fi.isDir()) t << "@$(DEL_FILE) -r " << dst << "\n\t" - << "@$(COPY_DIR) " << src << " " << dst << endl; + << "@$(COPY_DIR) " << src << " " << dst << Qt::endl; else t << "@$(DEL_FILE) " << dst << "\n\t" - << "@$(COPY_FILE) " << src << " " << dst << endl; + << "@$(COPY_FILE) " << src << " " << dst << Qt::endl; } } } @@ -940,7 +940,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) alldeps << symIt.key(); t << escapeDependencyPath(symIt.key()) << ":\n\t" << mkdir_p_asstring(bundle_dir) << "\n\t" - << "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << endl; + << "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << Qt::endl; } if (!project->isActiveConfig("shallow_bundle")) { @@ -952,24 +952,24 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << mkdir_p_asstring(bundle_dir + "Versions") << "\n\t" << "@-$(DEL_FILE) " << currentLink_f << "\n\t" << "@$(SYMLINK) " << project->first("QMAKE_FRAMEWORK_VERSION") - << ' ' << currentLink_f << endl; + << ' ' << currentLink_f << Qt::endl; } } } - t << endl << "all: " << deps + t << Qt::endl << "all: " << deps << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")), " \\\n\t\t", " \\\n\t\t", "") - << allDeps << endl << endl; + << allDeps << Qt::endl << Qt::endl; t << "dist: distdir FORCE\n\t"; t << "(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar)" " && $(MOVE) `dirname $(DISTDIR)`" << Option::dir_sep << "$(DISTNAME).tar.gz ." " && $(DEL_FILE) -r $(DISTDIR)"; - t << endl << endl; + t << Qt::endl << Qt::endl; t << "distdir: FORCE\n\t" << mkdir_p_asstring("$(DISTDIR)", false) << "\n\t" - << "$(COPY_FILE) --parents $(DIST) $(DISTDIR)" << Option::dir_sep << endl; + << "$(COPY_FILE) --parents $(DIST) $(DISTDIR)" << Option::dir_sep << Qt::endl; if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) { const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS"); for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) { @@ -979,20 +979,20 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(val.isEmpty()) continue; t << "\t$(COPY_FILE) --parents " << escapeFilePaths(val).join(' ') - << " $(DISTDIR)" << Option::dir_sep << endl; + << " $(DISTDIR)" << Option::dir_sep << Qt::endl; } } } if(!project->isEmpty("TRANSLATIONS")) - t << "\t$(COPY_FILE) --parents " << fileVar("TRANSLATIONS") << " $(DISTDIR)" << Option::dir_sep << endl; - t << endl << endl; + t << "\t$(COPY_FILE) --parents " << fileVar("TRANSLATIONS") << " $(DISTDIR)" << Option::dir_sep << Qt::endl; + t << Qt::endl << Qt::endl; QString clean_targets = " compiler_clean " + depVar("CLEAN_DEPS"); if(do_incremental) { t << "incrclean:\n"; if(src_incremental) t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJECTS)\n"; - t << endl; + t << Qt::endl; } t << "clean:" << clean_targets << "\n\t"; @@ -1060,7 +1060,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "-$(DEL_FILE) $(INCREMENTAL_OBJECTS)\n\t"; t << fileVarGlue("QMAKE_CLEAN","-$(DEL_FILE) "," ","\n\t") << "-$(DEL_FILE) *~ core *.core\n" - << fileVarGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << endl << endl; + << fileVarGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << Qt::endl << Qt::endl; ProString destdir = project->first("DESTDIR"); if (!destdir.isEmpty() && !destdir.endsWith(Option::dir_sep)) @@ -1068,7 +1068,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "distclean: clean " << depVar("DISTCLEAN_DEPS") << '\n'; if(!project->isEmpty("QMAKE_BUNDLE")) { QString bundlePath = escapeFilePath(destdir + project->first("QMAKE_BUNDLE")); - t << "\t-$(DEL_FILE) -r " << bundlePath << endl; + t << "\t-$(DEL_FILE) -r " << bundlePath << Qt::endl; } else if (project->isActiveConfig("staticlib") || project->isActiveConfig("plugin")) { t << "\t-$(DEL_FILE) " << escapeFilePath(destdir) << "$(TARGET) \n"; } else if (project->values("QMAKE_APP_FLAG").isEmpty()) { @@ -1087,9 +1087,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) { QString ofile = fileFixify(Option::output.fileName()); if(!ofile.isEmpty()) - t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl; + t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << Qt::endl; } - t << endl << endl; + t << Qt::endl << Qt::endl; t << "####### Sub-libraries\n\n"; if (!project->values("SUBLIBS").isEmpty()) { @@ -1100,7 +1100,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) for (it = l.begin(); it != l.end(); ++it) t << escapeDependencyPath(libdir + project->first("QMAKE_PREFIX_STATICLIB") + (*it) + '.' + project->first("QMAKE_EXTENSION_STATICLIB")) << ":\n\t" - << var(ProKey("MAKELIB" + *it)) << endl << endl; + << var(ProKey("MAKELIB" + *it)) << Qt::endl << Qt::endl; } if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) { @@ -1184,7 +1184,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) compilerExecutable = "$(CXX)"; // compile command - t << "\n\t" << compilerExecutable << cflags << " $(INCPATH) " << pchArchFlags << endl << endl; + t << "\n\t" << compilerExecutable << cflags << " $(INCPATH) " << pchArchFlags << Qt::endl << Qt::endl; } } } diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index de7363e51b..eb771a695a 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -99,7 +99,7 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t) writePkgConfigFile(); if(Option::mkfile::do_stub_makefile) { - t << "QMAKE = " << var("QMAKE_QMAKE") << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl; const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << escapeDependencyPath(*it) << ' '; @@ -148,7 +148,7 @@ void createLdResponseFile(const QString &fileName, const ProStringList &objList) .replace(QLatin1Char('\t'), QLatin1String("\\\t")) .replace(QLatin1Char('"'), QLatin1String("\\\"")) .replace(QLatin1Char('\''), QLatin1String("\\'")); - t << path << endl; + t << path << Qt::endl; } t.flush(); file.close(); @@ -162,9 +162,9 @@ void createArObjectScriptFile(const QString &fileName, const QString &target, co if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { QTextStream t(&file); // ### quoting? - t << "CREATE " << target << endl; + t << "CREATE " << target << Qt::endl; for (ProStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) { - t << "ADDMOD " << *it << endl; + t << "ADDMOD " << *it << Qt::endl; } t << "SAVE\n"; t.flush(); @@ -183,13 +183,13 @@ void MingwMakefileGenerator::writeMingwParts(QTextStream &t) << finalizeDependencyPaths(findDependencies(header)).join(" \\\n\t\t") << "\n\t" << mkdir_p_asstring(preCompHeaderOut) << "\n\t$(CC) -x c-header -c $(CFLAGS) $(INCPATH) -o " << escapeFilePath(cHeader) - << ' ' << escapeFilePath(header) << endl << endl; + << ' ' << escapeFilePath(header) << Qt::endl << Qt::endl; QString cppHeader = preCompHeaderOut + Option::dir_sep + "c++"; t << escapeDependencyPath(cppHeader) << ": " << escapeDependencyPath(header) << " " << finalizeDependencyPaths(findDependencies(header)).join(" \\\n\t\t") << "\n\t" << mkdir_p_asstring(preCompHeaderOut) << "\n\t$(CXX) -x c++-header -c $(CXXFLAGS) $(INCPATH) -o " << escapeFilePath(cppHeader) - << ' ' << escapeFilePath(header) << endl << endl; + << ' ' << escapeFilePath(header) << Qt::endl << Qt::endl; } } @@ -274,21 +274,21 @@ void MingwMakefileGenerator::writeIncPart(QTextStream &t) t << "-I"; t << escapeFilePath(inc) << ' '; } - t << endl; + t << Qt::endl; } void MingwMakefileGenerator::writeLibsPart(QTextStream &t) { if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") { - t << "LIB = " << var("QMAKE_LIB") << endl; + t << "LIB = " << var("QMAKE_LIB") << Qt::endl; } else { - t << "LINKER = " << var("QMAKE_LINK") << endl; - t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl; + t << "LINKER = " << var("QMAKE_LINK") << Qt::endl; + t << "LFLAGS = " << var("QMAKE_LFLAGS") << Qt::endl; t << "LIBS = " << fixLibFlags("LIBS").join(' ') << ' ' << fixLibFlags("LIBS_PRIVATE").join(' ') << ' ' << fixLibFlags("QMAKE_LIBS").join(' ') << ' ' - << fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl; + << fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << Qt::endl; } } @@ -350,7 +350,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t) } if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" <<var("QMAKE_POST_LINK"); - t << endl; + t << Qt::endl; } void MingwMakefileGenerator::writeRcFilePart(QTextStream &t) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 63d89a5388..9c2e789932 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -143,7 +143,7 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t) t << escapeDependencyPath(precompObj) << ": " << escapeDependencyPath(precompH) << ' ' << finalizeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t") << "\n\t$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP " - << escapeFilePath(precompH) << endl << endl; + << escapeFilePath(precompH) << Qt::endl << Qt::endl; } if (usePCHC) { QString precompRuleC = QString("-c -Yc -Fp%1 -Fo%2") @@ -151,7 +151,7 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t) t << escapeDependencyPath(precompObjC) << ": " << escapeDependencyPath(precompH) << ' ' << finalizeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t") << "\n\t$(CC) " + precompRuleC +" $(CFLAGS) $(INCPATH) -TC " - << escapeFilePath(precompH) << endl << endl; + << escapeFilePath(precompH) << Qt::endl << Qt::endl; } } @@ -314,7 +314,7 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t) t << " " << (*cit); for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) t << " " << (*cppit); - t << endl << endl; + t << Qt::endl << Qt::endl; bool useInferenceRules = !project->isActiveConfig("no_batch"); QSet<QString> source_directories; @@ -393,9 +393,9 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t) } } else { for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) - t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl; + t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << Qt::endl << Qt::endl; for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit) - t << (*cit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl; + t << (*cit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << Qt::endl << Qt::endl; } } @@ -498,7 +498,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) if(!project->isEmpty("QMAKE_POST_LINK")) { t << "\n\t" << var("QMAKE_POST_LINK"); } - t << endl; + t << Qt::endl; } void NmakeMakefileGenerator::writeLinkCommand(QTextStream &t, const QString &extraFlags, const QString &extraInlineFileContent) diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index b356f1bb73..33eff0d914 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -923,7 +923,7 @@ struct VCFilterFile inline QDebug operator<<(QDebug dbg, const VCFilterFile &p) { dbg.nospace() << "VCFilterFile(file(" << p.file - << ") excludeFromBuild(" << p.excludeFromBuild << "))" << endl; + << ") excludeFromBuild(" << p.excludeFromBuild << "))" << Qt::endl; return dbg.space(); } #endif diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 16f9361d13..8ee86ac395 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -320,11 +320,11 @@ void Win32MakefileGenerator::processRcFileVar() int rcCodePage = project->intValue("RC_CODEPAGE", 1200); // default: Unicode ts << "#include <windows.h>\n"; - ts << endl; + ts << Qt::endl; if (!rcIcons.isEmpty()) { for (int i = 0; i < rcIcons.size(); ++i) - ts << QString("IDI_ICON%1\tICON\tDISCARDABLE\t%2").arg(i + 1).arg(cQuoted(rcIcons[i])) << endl; - ts << endl; + ts << QString("IDI_ICON%1\tICON\tDISCARDABLE\t%2").arg(i + 1).arg(cQuoted(rcIcons[i])) << Qt::endl; + ts << Qt::endl; } if (!manifestFile.isEmpty()) { QString manifestResourceId; @@ -335,8 +335,8 @@ void Win32MakefileGenerator::processRcFileVar() ts << manifestResourceId << " RT_MANIFEST \"" << manifestFile << "\"\n"; } ts << "VS_VERSION_INFO VERSIONINFO\n"; - ts << "\tFILEVERSION " << QString(versionString).replace(".", ",") << endl; - ts << "\tPRODUCTVERSION " << QString(versionString).replace(".", ",") << endl; + ts << "\tFILEVERSION " << QString(versionString).replace(".", ",") << Qt::endl; + ts << "\tPRODUCTVERSION " << QString(versionString).replace(".", ",") << Qt::endl; ts << "\tFILEFLAGSMASK 0x3fL\n"; ts << "#ifdef _DEBUG\n"; ts << "\tFILEFLAGS VS_FF_DEBUG\n"; @@ -369,11 +369,11 @@ void Win32MakefileGenerator::processRcFileVar() ts << "\t\tBEGIN\n"; ts << "\t\t\tVALUE \"Translation\", " << QString("0x%1").arg(rcLang, 4, 16, QLatin1Char('0')) - << ", " << QString("%1").arg(rcCodePage, 4) << endl; + << ", " << QString("%1").arg(rcCodePage, 4) << Qt::endl; ts << "\t\tEND\n"; ts << "\tEND\n"; ts << "/* End of Version info */\n"; - ts << endl; + ts << Qt::endl; ts.flush(); @@ -470,7 +470,7 @@ void Win32MakefileGenerator::writeCleanParts(QTextStream &t) } } } - t << endl << endl; + t << Qt::endl << Qt::endl; t << "distclean: clean " << depVar("DISTCLEAN_DEPS"); { @@ -503,9 +503,9 @@ void Win32MakefileGenerator::writeCleanParts(QTextStream &t) { QString ofile = fileFixify(Option::output.fileName()); if(!ofile.isEmpty()) - t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl; + t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << Qt::endl; } - t << endl; + t << Qt::endl; } void Win32MakefileGenerator::writeIncPart(QTextStream &t) @@ -519,7 +519,7 @@ void Win32MakefileGenerator::writeIncPart(QTextStream &t) if(!inc.isEmpty()) t << "-I" << escapeFilePath(inc) << ' '; } - t << endl; + t << Qt::endl; } void Win32MakefileGenerator::writeStandardParts(QTextStream &t) @@ -527,51 +527,51 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) writeExportedVariables(t); t << "####### Compiler, tools and options\n\n"; - t << "CC = " << var("QMAKE_CC") << endl; - t << "CXX = " << var("QMAKE_CXX") << endl; + t << "CC = " << var("QMAKE_CC") << Qt::endl; + t << "CXX = " << var("QMAKE_CXX") << Qt::endl; t << "DEFINES = " << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") - << varGlue("DEFINES","-D"," -D","") << endl; + << varGlue("DEFINES","-D"," -D","") << Qt::endl; t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)\n"; t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)\n"; writeIncPart(t); writeLibsPart(t); - t << "QMAKE = " << var("QMAKE_QMAKE") << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << Qt::endl; t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? QString("idc") : var("QMAKE_IDC")) - << endl; + << Qt::endl; t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? QString("midl") : var("QMAKE_IDL")) - << endl; - t << "ZIP = " << var("QMAKE_ZIP") << endl; - t << "DEF_FILE = " << fileVar("DEF_FILE") << endl; - t << "RES_FILE = " << fileVar("RES_FILE") << endl; // Not on mingw, can't see why not though... - t << "COPY = " << var("QMAKE_COPY") << endl; - t << "SED = " << var("QMAKE_STREAM_EDITOR") << endl; - t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << endl; - t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; - t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; - t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; - t << "MOVE = " << var("QMAKE_MOVE") << endl; - t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; - t << "MKDIR = " << var("QMAKE_MKDIR") << endl; - t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl; - t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl; - t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; - t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << endl; - t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << endl; - t << endl; + << Qt::endl; + t << "ZIP = " << var("QMAKE_ZIP") << Qt::endl; + t << "DEF_FILE = " << fileVar("DEF_FILE") << Qt::endl; + t << "RES_FILE = " << fileVar("RES_FILE") << Qt::endl; // Not on mingw, can't see why not though... + t << "COPY = " << var("QMAKE_COPY") << Qt::endl; + t << "SED = " << var("QMAKE_STREAM_EDITOR") << Qt::endl; + t << "COPY_FILE = " << var("QMAKE_COPY_FILE") << Qt::endl; + t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << Qt::endl; + t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << Qt::endl; + t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << Qt::endl; + t << "MOVE = " << var("QMAKE_MOVE") << Qt::endl; + t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << Qt::endl; + t << "MKDIR = " << var("QMAKE_MKDIR") << Qt::endl; + t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << Qt::endl; + t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << Qt::endl; + t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << Qt::endl; + t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << Qt::endl; + t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << Qt::endl; + t << Qt::endl; t << "####### Output directory\n\n"; if(!project->values("OBJECTS_DIR").isEmpty()) - t << "OBJECTS_DIR = " << escapeFilePath(var("OBJECTS_DIR").remove(QRegExp("\\\\$"))) << endl; + t << "OBJECTS_DIR = " << escapeFilePath(var("OBJECTS_DIR").remove(QRegExp("\\\\$"))) << Qt::endl; else t << "OBJECTS_DIR = . \n"; - t << endl; + t << Qt::endl; t << "####### Files\n\n"; t << "SOURCES = " << valList(escapeFilePaths(project->values("SOURCES"))) - << " " << valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << endl; + << " " << valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << Qt::endl; // do this here so we can set DEST_TARGET to be the complete path to the final target if it is needed. QString orgDestDir = var("DESTDIR"); @@ -587,14 +587,14 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) writeExtraVariables(t); t << "DIST = " << fileVarList("DISTFILES") << ' ' - << fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl; - t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl; // unused + << fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << Qt::endl; + t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << Qt::endl; // unused // The comment is important to maintain variable compatibility with Unix // Makefiles, while not interpreting a trailing-slash as a linebreak t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak\n"; - t << "TARGET = " << escapeFilePath(target) << endl; - t << "DESTDIR_TARGET = " << fileVar("DEST_TARGET") << endl; - t << endl; + t << "TARGET = " << escapeFilePath(target) << Qt::endl; + t << "DESTDIR_TARGET = " << fileVar("DEST_TARGET") << Qt::endl; + t << Qt::endl; writeImplicitRulesPart(t); @@ -606,10 +606,10 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) const ProStringList &dlldirs = project->values("DLLDESTDIR"); for (ProStringList::ConstIterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) { t << "\t-$(COPY_FILE) $(DESTDIR_TARGET) " - << escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << endl; + << escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << Qt::endl; } } - t << endl; + t << Qt::endl; writeRcFilePart(t); } @@ -642,33 +642,33 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) } } } - t << endl << endl; + t << Qt::endl << Qt::endl; writeCleanParts(t); writeExtraTargets(t); writeExtraCompilerTargets(t); - t << endl << endl; + t << Qt::endl << Qt::endl; } void Win32MakefileGenerator::writeLibsPart(QTextStream &t) { if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") { - t << "LIBAPP = " << var("QMAKE_LIB") << endl; - t << "LIBFLAGS = " << var("QMAKE_LIBFLAGS") << endl; + t << "LIBAPP = " << var("QMAKE_LIB") << Qt::endl; + t << "LIBFLAGS = " << var("QMAKE_LIBFLAGS") << Qt::endl; } else { - t << "LINKER = " << var("QMAKE_LINK") << endl; - t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl; + t << "LINKER = " << var("QMAKE_LINK") << Qt::endl; + t << "LFLAGS = " << var("QMAKE_LFLAGS") << Qt::endl; t << "LIBS = " << fixLibFlags("LIBS").join(' ') << ' ' << fixLibFlags("LIBS_PRIVATE").join(' ') << ' ' << fixLibFlags("QMAKE_LIBS").join(' ') << ' ' - << fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << endl; + << fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << Qt::endl; } } void Win32MakefileGenerator::writeObjectsPart(QTextStream &t) { // Used in both deps and commands. - t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << endl; + t << "OBJECTS = " << valList(escapeDependencyPaths(project->values("OBJECTS"))) << Qt::endl; } void Win32MakefileGenerator::writeImplicitRulesPart(QTextStream &t) @@ -710,7 +710,7 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t) << var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "") << defines << incPathStr << " -fo " << escapeFilePath(res_file) << ' ' << escapeFilePath(rc_file); - t << endl << endl; + t << Qt::endl << Qt::endl; } } diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp index e92749a126..2f48763550 100644 --- a/qmake/generators/xmloutput.cpp +++ b/qmake/generators/xmloutput.cpp @@ -237,7 +237,7 @@ void XmlOutput::newTagOpen(const QString &tag) closeOpen(); if (format == NewLine) - xmlFile << endl << currentIndent; + xmlFile << Qt::endl << currentIndent; xmlFile << '<' << doConversion(tag); currentState = Attribute; tagStack.append(tag); @@ -271,7 +271,7 @@ void XmlOutput::closeTag() case Tag: decreaseIndent(); // <--- Pre-decrease indent if (format == NewLine) - xmlFile << endl << currentIndent; + xmlFile << Qt::endl << currentIndent; xmlFile << "</" << doConversion(tagStack.last()) << '>'; tagStack.pop_back(); break; @@ -343,7 +343,7 @@ void XmlOutput::addAttribute(const QString &attribute, const QString &value) break; } if (format == NewLine) - xmlFile << endl; + xmlFile << Qt::endl; xmlFile << currentIndent << doConversion(attribute) << "=\"" << doConversion(value) << "\""; } |