From 51980595e100a1f124e77f35ddfdd5cfd2f0722b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 4 Jul 2013 11:25:16 +0200 Subject: merge string literals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit makes for less visual noise and a tiny bit more efficient code. Change-Id: I587707fa4e2dc9bead9435bf5caf3a98ab680725 Reviewed-by: Tor Arne Vestbø Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.cpp | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'qmake/generators/makefile.cpp') diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f65f98f42b..a08c76416b 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1041,7 +1041,7 @@ MakefileGenerator::writeProjectMakefile() } } if(project->isActiveConfig("build_all")) { - t << "first: all" << endl; + t << "first: all\n"; QList::Iterator it; //install @@ -1057,8 +1057,8 @@ MakefileGenerator::writeProjectMakefile() t << endl; } else { t << "first: " << targets.first()->target << endl - << "install: " << targets.first()->target << "-install" << endl - << "uninstall: " << targets.first()->target << "-uninstall" << endl; + << "install: " << targets.first()->target << "-install\n" + << "uninstall: " << targets.first()->target << "-uninstall\n"; } writeSubTargets(t, targets, SubTargetsNoFlags); @@ -1397,7 +1397,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) t << "uninstall_" << (*it) << ": FORCE"; for (int i = uninst.size(); --i >= 0; ) t << "\n\t" << uninst.at(i); - t << "\n\t-$(DEL_DIR) " << filePrefixRoot(root, dst) << " " << endl << endl; + t << "\n\t-$(DEL_DIR) " << filePrefixRoot(root, dst) << " \n\n"; } t << endl; @@ -1910,7 +1910,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) if(tmp_clean.isEmpty()) tmp_clean = tmp_out; if(tmp_clean.indexOf("${QMAKE_") == -1) { - t << "\n\t" << "-$(DEL_FILE) " << tmp_clean; + t << "\n\t-$(DEL_FILE) " << tmp_clean; wrote_clean = true; } if(!wrote_clean_cmds || !wrote_clean) { @@ -2146,7 +2146,7 @@ MakefileGenerator::writeExtraCompilerVariables(QTextStream &t) const ProStringList &vars = project->values(ProKey(*it + ".variables")); for (ProStringList::ConstIterator varit = vars.begin(); varit != vars.end(); ++varit) { if(first) { - t << "\n####### Custom Compiler Variables" << endl; + t << "\n####### Custom Compiler Variables\n"; first = false; } t << "QMAKE_COMP_" << (*varit) << " = " @@ -2173,7 +2173,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t) } } if (!outlist.isEmpty()) { - t << "####### Custom Variables" << endl; + t << "####### Custom Variables\n"; t << outlist.join("\n") << endl << endl; } } @@ -2186,24 +2186,24 @@ MakefileGenerator::writeStubMakefile(QTextStream &t) for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; //const QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); - t << "first all clean install distclean uninstall: " << "qmake" << endl - << "qmake_all:" << endl; + t << "first all clean install distclean uninstall: qmake\n" + << "qmake_all:\n"; writeMakeQmake(t); - t << "FORCE:" << endl << endl; + t << "FORCE:\n\n"; return true; } bool MakefileGenerator::writeMakefile(QTextStream &t) { - t << "####### Compile" << endl << endl; + t << "####### Compile\n\n"; writeObj(t, "SOURCES"); writeObj(t, "GENERATED_SOURCES"); - t << "####### Install" << endl << endl; + t << "####### Install\n\n"; writeInstalls(t); - t << "FORCE:" << endl << endl; + t << "FORCE:\n\n"; return true; } @@ -2246,7 +2246,7 @@ QString MakefileGenerator::build_args(const QString &outdir) void MakefileGenerator::writeHeader(QTextStream &t) { - t << "#############################################################################" << endl; + t << "#############################################################################\n"; t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << endl; t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ") on: "; t << QDateTime::currentDateTime().toString() << endl; @@ -2254,7 +2254,7 @@ MakefileGenerator::writeHeader(QTextStream &t) t << "# Template: " << var("TEMPLATE") << endl; if(!project->isActiveConfig("build_pass")) t << "# Command: " << build_args().replace("$(QMAKE)", var("QMAKE_QMAKE")) << endl; - t << "#############################################################################" << endl; + t << "#############################################################################\n"; t << endl; QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); if (ofile.lastIndexOf(Option::dir_sep) != -1) @@ -2379,7 +2379,7 @@ void MakefileGenerator::writeSubDirs(QTextStream &t) { QList targets = findSubDirsSubTargets(); - t << "first: make_first" << endl; + t << "first: make_first\n"; int flags = SubTargetInstalls; if(project->isActiveConfig("ordered")) flags |= SubTargetOrdered; @@ -2539,10 +2539,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList::Iterator it = targets.begin(); it != targets.end(); ++it) { if(!(*it)->profile.isEmpty()) - t << " " << (*it)->target << "-" << "qmake_all"; + t << " " << (*it)->target << "-qmake_all"; } } - t << " FORCE" << endl << endl; + t << " FORCE\n\n"; } for(int s = 0; s < targetSuffixes.size(); ++s) { @@ -2571,7 +2571,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QListvalues("UNINSTALLDEPS") += "uninstall_subtargets"; writeInstalls(t, true); } - t << "FORCE:" << endl << endl; + t << "FORCE:\n\n"; } void @@ -2681,7 +2681,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) { QStringList files = fileFixify(Option::mkfile::project_files); - t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": " << "\n\t" + t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": \n\t" << "@$(QMAKE) -prl " << buildArgs() << " " << files.join(' ') << endl; } @@ -2705,13 +2705,13 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) for(int include = 0; include < included.size(); ++include) { const ProString &i = included.at(include); if(!i.isEmpty()) - t << i << ":" << endl; + t << i << ":\n"; } } if(project->first("QMAKE_ORIG_TARGET") != "qmake") { t << "qmake: FORCE\n\t@" << qmake << endl << endl; if (!noDummyQmakeAll) - t << "qmake_all: FORCE" << endl << endl; + t << "qmake_all: FORCE\n\n"; } } @@ -3254,7 +3254,7 @@ MakefileGenerator::writePkgConfigFile() if (project->isActiveConfig("shared")) pkgConfiglibName += project->first("TARGET_VERSION_EXT").toQString(); } - t << pkgConfiglibDir << " " << pkgConfiglibName << " " << endl; + t << pkgConfiglibDir << " " << pkgConfiglibName << " \n"; ProStringList libs; if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) { @@ -3278,7 +3278,7 @@ MakefileGenerator::writePkgConfigFile() << varGlue("PRL_EXPORT_CXXFLAGS", "", " ", " ") << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ") // << varGlue("DEFINES","-D"," -D"," ") - << "-I${includedir}" << endl; + << "-I${includedir}\n"; // requires const QString requires = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' '); -- cgit v1.2.3