summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp18
-rw-r--r--qmake/generators/makefile.cpp10
-rw-r--r--qmake/generators/unix/unixmake.cpp8
-rw-r--r--qmake/generators/unix/unixmake2.cpp16
-rw-r--r--qmake/generators/win32/cesdkhandler.cpp2
-rw-r--r--qmake/generators/win32/mingw_make.cpp2
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp2
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp4
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp10
-rw-r--r--qmake/generators/win32/winmakefile.cpp6
-rw-r--r--qmake/generators/xmloutput.cpp8
-rw-r--r--qmake/main.cpp2
12 files changed, 44 insertions, 44 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index ef9aa9a2e6..ca7c466006 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1494,21 +1494,21 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
if (plist_in_file.open(QIODevice::ReadOnly)) {
QTextStream plist_in(&plist_in_file);
QString plist_in_text = plist_in.readAll();
- plist_in_text.replace("@ICON@",
+ plist_in_text.replace(QLatin1String("@ICON@"),
(project->isEmpty("ICON") ? QString("") : project->first("ICON").toQString().section(Option::dir_sep, -1)));
if (project->first("TEMPLATE") == "app") {
- plist_in_text.replace("@EXECUTABLE@", project->first("QMAKE_ORIG_TARGET").toQString());
+ plist_in_text.replace(QLatin1String("@EXECUTABLE@"), project->first("QMAKE_ORIG_TARGET").toQString());
} else {
- plist_in_text.replace("@LIBRARY@", project->first("QMAKE_ORIG_TARGET").toQString());
+ plist_in_text.replace(QLatin1String("@LIBRARY@"), project->first("QMAKE_ORIG_TARGET").toQString());
}
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
if (bundlePrefix.isEmpty())
bundlePrefix = "com.yourcompany";
- plist_in_text.replace("@BUNDLEIDENTIFIER@", bundlePrefix + '.' + QLatin1String("${PRODUCT_NAME:rfc1034identifier}"));
+ plist_in_text.replace(QLatin1String("@BUNDLEIDENTIFIER@"), bundlePrefix + '.' + QLatin1String("${PRODUCT_NAME:rfc1034identifier}"));
if (!project->values("VERSION").isEmpty()) {
- plist_in_text.replace("@SHORT_VERSION@", project->first("VER_MAJ") + "." + project->first("VER_MIN"));
+ plist_in_text.replace(QLatin1String("@SHORT_VERSION@"), project->first("VER_MAJ") + "." + project->first("VER_MIN"));
}
- plist_in_text.replace("@TYPEINFO@",
+ plist_in_text.replace(QLatin1String("@TYPEINFO@"),
(project->isEmpty("QMAKE_PKGINFO_TYPEINFO")
? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4).toQString()));
QFile plist_out_file(Option::output_dir + "/Info.plist");
@@ -1711,9 +1711,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
QTextStream defaultSchemeStream(&defaultSchemeFile);
QString schemeData = defaultSchemeStream.readAll();
- schemeData.replace("@QMAKE_ORIG_TARGET@", target);
- schemeData.replace("@TARGET_PBX_KEY@", keyFor(pbx_dir + "QMAKE_PBX_TARGET"));
- schemeData.replace("@TEST_BUNDLE_PBX_KEY@", keyFor("QMAKE_TEST_BUNDLE_REFERENCE"));
+ schemeData.replace(QLatin1String("@QMAKE_ORIG_TARGET@"), target);
+ schemeData.replace(QLatin1String("@TARGET_PBX_KEY@"), keyFor(pbx_dir + "QMAKE_PBX_TARGET"));
+ schemeData.replace(QLatin1String("@TEST_BUNDLE_PBX_KEY@"), keyFor("QMAKE_TEST_BUNDLE_REFERENCE"));
QTextStream outputSchemeStream(&outputSchemeFile);
outputSchemeStream << schemeData;
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 4dfe69fbde..b6904822f1 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1132,8 +1132,8 @@ MakefileGenerator::writeObj(QTextStream &t, const char *src)
ProStringList::ConstIterator oit = objl.begin();
ProStringList::ConstIterator sit = srcl.begin();
- QString stringSrc("$src");
- QString stringObj("$obj");
+ QLatin1String stringSrc("$src");
+ QLatin1String stringObj("$obj");
for(;sit != srcl.end() && oit != objl.end(); ++oit, ++sit) {
if((*sit).isEmpty())
continue;
@@ -2282,7 +2282,7 @@ MakefileGenerator::writeHeader(QTextStream &t)
t << "# Project: " << fileFixify(project->projectFile()) << endl;
t << "# Template: " << var("TEMPLATE") << endl;
if(!project->isActiveConfig("build_pass"))
- t << "# Command: " << build_args().replace("$(QMAKE)", var("QMAKE_QMAKE")) << endl;
+ t << "# Command: " << build_args().replace(QLatin1String("$(QMAKE)"), var("QMAKE_QMAKE")) << endl;
t << "#############################################################################\n";
t << endl;
QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
@@ -3177,7 +3177,7 @@ MakefileGenerator::pkgConfigFixPath(QString path) const
{
QString prefix = pkgConfigPrefix();
if(path.startsWith(prefix))
- path.replace(prefix, "${prefix}");
+ path.replace(prefix, QLatin1String("${prefix}"));
return path;
}
@@ -3329,7 +3329,7 @@ static QString windowsifyPath(const QString &str)
{
// The paths are escaped in prl files, so every slash needs to turn into two backslashes.
// Then each backslash needs to be escaped for sed. And another level for C quoting here.
- return QString(str).replace('/', "\\\\\\\\");
+ return QString(str).replace('/', QLatin1String("\\\\\\\\"));
}
QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QString &src, const QString &dst)
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 12b9f09edd..5c6db3364e 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -178,12 +178,12 @@ UnixMakefileGenerator::init()
pchBaseName += project->first("QMAKE_ORIG_TARGET").toQString();
// replace place holders
- pchFlags.replace("${QMAKE_PCH_INPUT}",
+ pchFlags.replace(QLatin1String("${QMAKE_PCH_INPUT}"),
escapeFilePath(project->first("PRECOMPILED_HEADER").toQString()));
- pchFlags.replace("${QMAKE_PCH_OUTPUT_BASE}", escapeFilePath(pchBaseName));
+ pchFlags.replace(QLatin1String("${QMAKE_PCH_OUTPUT_BASE}"), escapeFilePath(pchBaseName));
if (project->isActiveConfig("icc_pch_style")) {
// icc style
- pchFlags.replace("${QMAKE_PCH_OUTPUT}",
+ pchFlags.replace(QLatin1String("${QMAKE_PCH_OUTPUT}"),
escapeFilePath(pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT")));
} else {
// gcc style (including clang_pch_style)
@@ -197,7 +197,7 @@ UnixMakefileGenerator::init()
ProString language = project->first(ProKey("QMAKE_LANGUAGE_" + compiler));
if (!language.isEmpty()) {
- pchFlags.replace("${QMAKE_PCH_OUTPUT}",
+ pchFlags.replace(QLatin1String("${QMAKE_PCH_OUTPUT}"),
escapeFilePath(pchBaseName + language + headerSuffix));
}
}
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 9db64bebee..848e47f696 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -536,7 +536,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "ld -r -o " << incr_target_dir_f << ' ' << link_deps << endl;
//communicated below
ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
- cmd[0] = cmd.at(0).toQString().replace("$(OBJECTS) ", "$(INCREMENTAL_OBJECTS)"); //ick
+ cmd[0] = cmd.at(0).toQString().replace(QLatin1String("$(OBJECTS) "), QLatin1String("$(INCREMENTAL_OBJECTS)")); //ick
cmd.append(incr_target_dir_f);
deps.prepend(incr_target_dir_d + ' ');
incr_deps = "$(INCREMENTAL_OBJECTS)";
@@ -704,7 +704,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << destdir_d << "$(TARGET): " << depVar("PRE_TARGETDEPS")
<< ' ' << depVar("POST_TARGETDEPS") << valList(escapeDependencyPaths(build)) << "\n\t";
ar = project->first("QMAKE_AR_CMD").toQString();
- ar.replace("$(OBJECTS)", escapeFilePaths(build).join(' '));
+ ar.replace(QLatin1String("$(OBJECTS)"), escapeFilePaths(build).join(' '));
} else {
t << destdir_d << escapeDependencyPath(*libit) << ": "
<< valList(escapeDependencyPaths(build)) << "\n\t";
@@ -1083,8 +1083,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "\n\techo \"// Automatically generated, do not modify\" > " << sourceFile_f
<< "\n\trm -f " << escapeFilePath(pchOutput);
- pchFlags.replace("${QMAKE_PCH_TEMP_SOURCE}", sourceFile_f)
- .replace("${QMAKE_PCH_TEMP_OBJECT}", escapeFilePath(objectFile));
+ pchFlags.replace(QLatin1String("${QMAKE_PCH_TEMP_SOURCE}"), sourceFile_f)
+ .replace(QLatin1String("${QMAKE_PCH_TEMP_OBJECT}"), escapeFilePath(objectFile));
} else {
// gcc style (including clang_pch_style)
ProString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
@@ -1103,9 +1103,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< escapeDependencyPaths(findDependencies(pchInput)).join(" \\\n\t\t")
<< "\n\t" << mkdir_p_asstring(pchOutputDir);
}
- pchFlags.replace("${QMAKE_PCH_INPUT}", escapeFilePath(pchInput))
- .replace("${QMAKE_PCH_OUTPUT_BASE}", escapeFilePath(pchBaseName.toQString()))
- .replace("${QMAKE_PCH_OUTPUT}", escapeFilePath(pchOutput.toQString()));
+ pchFlags.replace(QLatin1String("${QMAKE_PCH_INPUT}"), escapeFilePath(pchInput))
+ .replace(QLatin1String("${QMAKE_PCH_OUTPUT_BASE}"), escapeFilePath(pchBaseName.toQString()))
+ .replace(QLatin1String("${QMAKE_PCH_OUTPUT}"), escapeFilePath(pchOutput.toQString()));
QString compilerExecutable;
if (compiler == "C" || compiler == "OBJC")
@@ -1151,7 +1151,7 @@ void UnixMakefileGenerator::init2()
ProStringList &ar_cmd = project->values("QMAKE_AR_CMD");
if (!ar_cmd.isEmpty())
- ar_cmd[0] = ar_cmd.at(0).toQString().replace("(TARGET)","(TARGETA)");
+ ar_cmd[0] = ar_cmd.at(0).toQString().replace(QLatin1String("(TARGET)"), QLatin1String("(TARGETA)"));
else
ar_cmd.append("$(AR) $(TARGETA) $(OBJECTS)");
if (!project->isEmpty("QMAKE_BUNDLE")) {
diff --git a/qmake/generators/win32/cesdkhandler.cpp b/qmake/generators/win32/cesdkhandler.cpp
index 4550cc8aed..8934bbd95f 100644
--- a/qmake/generators/win32/cesdkhandler.cpp
+++ b/qmake/generators/win32/cesdkhandler.cpp
@@ -147,7 +147,7 @@ bool CeSdkHandler::parseMsBuildFile(QFile *file, CeSdkInfo *info)
QSettings sdkRootPathRegistry(regString, QSettings::NativeFormat);
const QString erg = sdkRootPathRegistry.value(QStringLiteral(".")).toString();
const QString fullSdkRootPath = erg + sdkRootPath.mid(endIndex + 1);
- const QString rootString = QStringLiteral("$(SdkRootPath)");
+ const QLatin1String rootString("$(SdkRootPath)");
includePath = includePath.replace(rootString, fullSdkRootPath);
libraryPath = libraryPath.replace(rootString, fullSdkRootPath);
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 1837c6c0cf..8c315e0696 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -51,7 +51,7 @@ QString MingwMakefileGenerator::escapeDependencyPath(const QString &path) const
{
QString ret = path;
ret.replace('\\', "/"); // ### this shouldn't be here
- ret.replace(' ', "\\ ");
+ ret.replace(' ', QLatin1String("\\ "));
return ret;
}
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index bcfab80ccf..9dbb33ba14 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -328,7 +328,7 @@ static QString vcxCommandSeparator()
static QString unquote(const QString &value)
{
QString result = value;
- result.replace(QStringLiteral("\\\""), QStringLiteral("\""));
+ result.replace(QLatin1String("\\\""), QLatin1String("\""));
return result;
}
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 27427db68b..ca8e8f2615 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -53,7 +53,7 @@ static QString nmakePathList(const QStringList &list)
pathList.append(QDir::cleanPath(path));
return QDir::toNativeSeparators(pathList.join(QLatin1Char(';')))
- .replace('#', QStringLiteral("^#")).replace('$', QStringLiteral("$$"));
+ .replace('#', QLatin1String("^#")).replace('$', QLatin1String("$$"));
}
NmakeMakefileGenerator::NmakeMakefileGenerator() : Win32MakefileGenerator(), usePCH(false)
@@ -330,7 +330,7 @@ QString NmakeMakefileGenerator::var(const ProKey &value) const
QString precompRule = QString("-c -FI%1 -Yu%2 -Fp%3")
.arg(precompH_f, precompH_f, escapeFilePath(precompPch));
QString p = MakefileGenerator::var(value);
- p.replace("-c", precompRule);
+ p.replace(QLatin1String("-c"), precompRule);
// Cannot use -Gm with -FI & -Yu, as this gives an
// internal compiler error, on the newer compilers
// ### work-around for a VS 2003 bug. Move to some prf file or remove completely.
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index a1a8407a11..52d84e8bce 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -704,12 +704,12 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
}
QString slnConf = _slnSolutionConf;
if (!project->isEmpty("VCPROJ_ARCH")) {
- slnConf.replace(QString("|Win32"), "|" + project->first("VCPROJ_ARCH"));
+ slnConf.replace(QLatin1String("|Win32"), "|" + project->first("VCPROJ_ARCH"));
} else if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) {
QString slnPlatform = QString("|") + project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
- slnConf.replace(QString("|Win32"), slnPlatform);
+ slnConf.replace(QLatin1String("|Win32"), slnPlatform);
} else if (is64Bit) {
- slnConf.replace(QString("|Win32"), "|x64");
+ slnConf.replace(QLatin1String("|Win32"), QLatin1String("|x64"));
}
t << slnConf;
@@ -1706,12 +1706,12 @@ QString VcprojGenerator::replaceExtraCompilerVariables(
if(defines.isEmpty())
defines.append(varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") +
varGlue("DEFINES"," -D"," -D",""));
- ret.replace("$(DEFINES)", defines.first().toQString());
+ ret.replace(QLatin1String("$(DEFINES)"), defines.first().toQString());
ProStringList &incpath = project->values("VCPROJ_MAKEFILE_INCPATH");
if(incpath.isEmpty() && !this->var("MSVCPROJ_INCPATH").isEmpty())
incpath.append(this->var("MSVCPROJ_INCPATH"));
- ret.replace("$(INCPATH)", incpath.join(' '));
+ ret.replace(QLatin1String("$(INCPATH)"), incpath.join(' '));
return ret;
}
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index a042cb0d4b..ccf6457048 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -401,7 +401,7 @@ void Win32MakefileGenerator::processRcFileVar()
project->values("RC_FILE").first() = fi.absoluteFilePath();
}
- resFile.replace(".rc", Option::res_ext);
+ resFile.replace(QLatin1String(".rc"), Option::res_ext);
project->values("RES_FILE").prepend(fileInfo(resFile).fileName());
QString resDestDir;
if (project->isActiveConfig("staticlib"))
@@ -771,8 +771,8 @@ QString Win32MakefileGenerator::escapeFilePath(const QString &path) const
QString Win32MakefileGenerator::cQuoted(const QString &str)
{
QString ret = str;
- ret.replace(QLatin1Char('\\'), QStringLiteral("\\\\"));
- ret.replace(QLatin1Char('"'), QStringLiteral("\\\""));
+ ret.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
+ ret.replace(QLatin1Char('"'), QLatin1String("\\\""));
ret.prepend(QLatin1Char('"'));
ret.append(QLatin1Char('"'));
return ret;
diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp
index 4f2e7fee69..479a7e426d 100644
--- a/qmake/generators/xmloutput.cpp
+++ b/qmake/generators/xmloutput.cpp
@@ -140,11 +140,11 @@ QString XmlOutput::doConversion(const QString &text)
}
if (conversion == XMLConversion) {
- output.replace('\"', "&quot;");
- output.replace('\'', "&apos;");
+ output.replace('\"', QLatin1String("&quot;"));
+ output.replace('\'', QLatin1String("&apos;"));
} else if (conversion == EscapeConversion) {
- output.replace('\"', "\\\"");
- output.replace('\'', "\\\'");
+ output.replace('\"', QLatin1String("\\\""));
+ output.replace('\'', QLatin1String("\\\'"));
}
return output;
}
diff --git a/qmake/main.cpp b/qmake/main.cpp
index 5f848d4820..96cb758e26 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -130,7 +130,7 @@ static int doSed(int argc, char **argv)
SedSubst subst;
subst.from = QRegExp(phases.at(0), matchcase);
subst.to = phases.at(1);
- subst.to.replace("\\\\", "\\"); // QString::replace(rx, sub) groks \1, but not \\.
+ subst.to.replace(QLatin1String("\\\\"), QLatin1String("\\")); // QString::replace(rx, sub) groks \1, but not \\.
substs << subst;
}
} else if (argv[i][0] == '-' && argv[i][1] != 0) {