summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp2
-rw-r--r--qmake/generators/makefile.cpp2
-rw-r--r--qmake/generators/win32/cesdkhandler.cpp8
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp6
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp14
5 files changed, 16 insertions, 16 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 11a038665d..3ff022d5f1 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1646,7 +1646,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
if (attributes.isEmpty())
continue;
t << "\t\t\t\t\t" << target << " = {\n";
- foreach (const ProString &attribute, attributes)
+ for (const ProString &attribute : attributes)
t << "\t\t\t\t\t\t" << writeSettings(attribute.toQString(), project->first(ProKey("QMAKE_PBX_TARGET_ATTRIBUTES_" + target + "_" + attribute))) << ";\n";
t << "\t\t\t\t\t};\n";
}
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 0dbdb3541e..0b7b301879 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -954,7 +954,7 @@ static QString
qv(const ProStringList &val)
{
QString ret;
- foreach (const ProString &v, val)
+ for (const ProString &v : val)
ret += qv(v);
return ret;
}
diff --git a/qmake/generators/win32/cesdkhandler.cpp b/qmake/generators/win32/cesdkhandler.cpp
index 4f166d727d..e0b5adb99a 100644
--- a/qmake/generators/win32/cesdkhandler.cpp
+++ b/qmake/generators/win32/cesdkhandler.cpp
@@ -173,7 +173,7 @@ QStringList CeSdkHandler::getMsBuildToolPaths() const
QStringList CeSdkHandler::filterMsBuildToolPaths(const QStringList &paths) const
{
QStringList result;
- foreach (const QString &path, paths) {
+ for (const QString &path : paths) {
QDir dirVC110(path);
if (path.endsWith(QLatin1String("bin")))
dirVC110.cdUp();
@@ -191,9 +191,9 @@ bool CeSdkHandler::retrieveEnvironment(const QStringList &relativePaths,
CeSdkInfo *info)
{
bool result = false;
- foreach (const QString &path, toolPaths) {
+ for (const QString &path : toolPaths) {
const QDir dir(path);
- foreach (const QString &filePath, relativePaths) {
+ for (const QString &filePath : relativePaths) {
QFile file(dir.absoluteFilePath(filePath));
if (file.exists())
result = parseMsBuildFile(&file, info) || result;
@@ -209,7 +209,7 @@ void CeSdkHandler::retrieveWEC2013SDKs()
const QStringList filteredToolPaths = filterMsBuildToolPaths(toolPaths);
QSettings settings("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows CE Tools\\SDKs", QSettings::NativeFormat);
const QStringList keys = settings.allKeys();
- foreach (const QString &key, keys) {
+ for (const QString &key : keys) {
if (key.contains(QLatin1String("SDKInformation")) || key.contains(QLatin1Char('.'))) {
QFile sdkPropertyFile(settings.value(key).toString());
if (!sdkPropertyFile.exists())
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index db0d2cf9c5..e04be1e1e2 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
static QString nmakePathList(const QStringList &list)
{
QStringList pathList;
- foreach (const QString &path, list)
+ for (const QString &path : list)
pathList.append(QDir::cleanPath(path));
return QDir::toNativeSeparators(pathList.join(QLatin1Char(';')))
@@ -79,7 +79,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
+ " (" + variables["CE_ARCH"].join(' ') + ")";
const QList<CeSdkInfo> sdkList = sdkhandler.listAll();
CeSdkInfo sdk;
- foreach (const CeSdkInfo &info, sdkList) {
+ for (const CeSdkInfo &info : sdkList) {
if (info.name().compare(sdkName, Qt::CaseInsensitive ) == 0) {
sdk = info;
break;
@@ -91,7 +91,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
t << "\nPATH = " << sdk.binPath() << "\n";
} else {
QStringList sdkStringList;
- foreach (const CeSdkInfo &info, sdkList)
+ for (const CeSdkInfo &info : sdkList)
sdkStringList << info.name();
fprintf(stderr, "Failed to find Windows CE SDK matching %s, found: %s\n"
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 837b1747bf..cb0b1b1331 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -124,7 +124,7 @@ DotNET which_dotnet_version(const QByteArray &preferredVersion = QByteArray())
// More than one version installed, search directory path
QString paths = qgetenv("PATH");
const QStringList pathlist = paths.split(QLatin1Char(';'));
- foreach (const QString &path, pathlist) {
+ for (const QString &path : pathlist) {
for (i = 0; dotNetCombo[i].version; ++i) {
const QString productPath = installPaths.value(dotNetCombo[i].version);
if (productPath.isEmpty())
@@ -533,13 +533,13 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
if (tmpList.size()) {
const ProStringList depends = tmpList;
- foreach (const ProString &dep, depends) {
+ for (const ProString &dep : depends) {
QString depend = dep.toQString();
if (!projGuids[depend].isEmpty()) {
newDep->dependencies << projGuids[depend];
} else if (subdirProjectLookup[projLookup[depend]].size() > 0) {
- ProStringList tmpLst = subdirProjectLookup[projLookup[depend]];
- foreach (const ProString &tDep, tmpLst) {
+ const ProStringList tmpLst = subdirProjectLookup[projLookup[depend]];
+ for (const ProString &tDep : tmpLst) {
QString tmpDep = tDep.toQString();
newDep->dependencies << projGuids[projLookup[tmpDep]];
}
@@ -1264,7 +1264,7 @@ void VcprojGenerator::initDeploymentTool()
if (targetPath.endsWith("/") || targetPath.endsWith("\\"))
targetPath.chop(1);
}
- ProStringList dllPaths = project->values("QMAKE_DLL_PATHS");
+ const ProStringList dllPaths = project->values("QMAKE_DLL_PATHS");
// Only deploy Qt libs for shared build
if (!dllPaths.isEmpty() &&
!(conf.WinRT && project->first("MSVC_VER").toQString() == "14.0")) {
@@ -1282,7 +1282,7 @@ void VcprojGenerator::initDeploymentTool()
// Use only the file name and check in Qt's install path and LIBPATHs to check for existence
dllName.remove(0, dllName.lastIndexOf(QLatin1Char('/')) + 1);
QFileInfo info;
- foreach (const ProString &dllPath, dllPaths) {
+ for (const ProString &dllPath : dllPaths) {
QString absoluteDllFilePath = dllPath.toQString();
if (!absoluteDllFilePath.endsWith(QLatin1Char('/')))
absoluteDllFilePath += QLatin1Char('/');
@@ -1664,7 +1664,7 @@ void VcprojGenerator::initExtraCompilerOutputs()
// provided that the input file variable is not handled already (those in otherFilters
// are handled, so we avoid them).
const ProStringList &inputVars = project->values(ProKey(*it + ".input"));
- foreach (const ProString &inputVar, inputVars) {
+ for (const ProString &inputVar : inputVars) {
if (!otherFilters.contains(inputVar)) {
const ProStringList &tmp_in = project->values(inputVar.toKey());
for (int i = 0; i < tmp_in.count(); ++i) {