diff options
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/doc/qmake.qdocconf | 2 | ||||
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 26 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 14 | ||||
-rw-r--r-- | qmake/generators/projectgenerator.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 23 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 95 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 29 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.h | 5 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 4 | ||||
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 2 | ||||
-rw-r--r-- | qmake/property.cpp | 14 |
13 files changed, 122 insertions, 106 deletions
diff --git a/qmake/doc/qmake.qdocconf b/qmake/doc/qmake.qdocconf index 3493a697f4..cf8f911372 100644 --- a/qmake/doc/qmake.qdocconf +++ b/qmake/doc/qmake.qdocconf @@ -25,6 +25,8 @@ sources = src/qmake-manual.qdoc imagedirs = images exampledirs = snippets +tagfile = qmake.tags + depends += \ activeqt \ qt3d \ diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 84e3fb6df4..fcefe1381b 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -2792,6 +2792,26 @@ See also \l{#DEPENDPATH}{DEPENDPATH}. + \target WINDOWS_TARGET_PLATFORM_VERSION + \section1 WINDOWS_TARGET_PLATFORM_VERSION + + Specifies the targeted Windows version; this corresponds to the tag + \c{WindowsTargetPlatformVersion} in vcxproj files. + + On desktop Windows, the default value is the value of the environment + variable \c{WindowsSDKVersion}. + + On WinRT, the default value is the value of the environment variable + \c{UCRTVERSION}. + + \target WINDOWS_TARGET_PLATFORM_MIN_VERSION + \section1 WINDOWS_TARGET_PLATFORM_MIN_VERSION + + Specifies the minimum version of the Windows target platform; this + corresponds to the tag \c{WindowsTargetPlatformMinVersion} in vcxproj files. + + Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}. + \target WINRT_MANIFEST \section1 WINRT_MANIFEST @@ -2925,10 +2945,12 @@ \li The version number of the package. Defaults to \c{1.0.0.0}. \row \li minVersion - \li The minimum required Windows version to run the package. Defaults to the environment variable \c UCRTVersion. + \li The minimum required Windows version to run the package. + Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}. \row \li maxVersionTested - \li The maximum Windows version the package has been tested against. Defaults to \c WINRT_MANIFEST.minVersion + \li The maximum Windows version the package has been tested against. + Defaults to \c{WINDOWS_TARGET_PLATFORM_MIN_VERSION}. \endtable diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index ab261d02f1..7364353183 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -627,7 +627,7 @@ MakefileGenerator::init() compiler.flags |= Compiler::CompilerNoCheckDeps; compilers.append(compiler); } - for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) { + for (ProStringList::ConstIterator it = quc.cbegin(); it != quc.cend(); ++it) { const ProStringList &inputs = v[ProKey(*it + ".input")]; for(x = 0; x < inputs.size(); ++x) { Compiler compiler; @@ -1910,7 +1910,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) replaceExtraCompilerVariables(tmp_out, input, QString(), NoShell), FileFixifyFromOutdir)); } else { - for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { + for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) { t << ' ' << escapeDependencyPath(fileFixify( replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString(), NoShell), FileFixifyFromOutdir)); @@ -1945,7 +1945,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) const QString del_statement("-$(DEL_FILE)"); if(!wrote_clean) { QStringList dels; - for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { + for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) { QString tinp = (*input).toQString(); QString out = replaceExtraCompilerVariables(tmp_out, tinp, QString(), NoShell); for (const QString &rc : qAsConst(raw_clean)) { @@ -1974,7 +1974,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) if(!cleans.isEmpty()) t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, ""); if(!wrote_clean_cmds) { - for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { + for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) { QString tinp = (*input).toQString(); t << "\n\t" << replaceExtraCompilerVariables(tmp_clean_cmds, tinp, replaceExtraCompilerVariables(tmp_out, tinp, QString(), NoShell), TargetShell); @@ -1993,7 +1993,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) QStringList deps, inputs; if(!tmp_dep.isEmpty()) deps += fileFixify(tmp_dep, FileFixifyFromOutdir); - for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { + for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) { QString inpf = (*input).toQString(); deps += findDependencies(inpf); inputs += Option::fixPathToTargetOS(inpf, false); @@ -2068,7 +2068,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) t << "\n\t" << cmd << endl << endl; continue; } - for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { + for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) { QString inpf = (*input).toQString(); QStringList deps; deps << fileFixify(inpf, FileFixifyFromOutdir); @@ -3391,7 +3391,7 @@ MakefileGenerator::writePkgConfigFile() libs << "QMAKE_LIBS_PRIVATE"; libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread? t << "Libs.private:"; - for (ProStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it) + for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it) t << ' ' << fixLibFlags((*it).toKey()).join(' '); t << endl; } diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index f45a90b851..ef34955eb1 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp @@ -345,14 +345,10 @@ ProjectGenerator::writeMakefile(QTextStream &t) << getWritableVar("CONFIG_REMOVE", false) << getWritableVar("INCLUDEPATH") << endl; - t << "# The following define makes your compiler warn you if you use any\n" - "# feature of Qt which has been marked as deprecated (the exact warnings\n" - "# depend on your compiler). Please consult the documentation of the\n" - "# deprecated API in order to know how to port your code away from it.\n" - "DEFINES += QT_DEPRECATED_WARNINGS\n" - "\n" - "# You can also make your code fail to compile if you use deprecated APIs.\n" + 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" + "# Please consult the documentation of the deprecated API in order to know\n" + "# how to port your code away from it.\n" "# You can also select to disable deprecated APIs only up to a certain version of Qt.\n" "#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0\n\n"; diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 4b33713a75..fa283d0291 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1487,7 +1487,7 @@ UnixMakefileGenerator::writeLibtoolFile() ProStringList libs; libs << "LIBS" << "QMAKE_LIBS"; t << "dependency_libs='"; - for (ProStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it) + for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it) t << fixLibFlags((*it).toKey()).join(' ') << ' '; t << "'\n\n"; diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index ad2976aa01..0e95766f8e 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -34,7 +34,6 @@ #include <qscopedpointer.h> #include <qstringlist.h> #include <qfileinfo.h> -#include <qversionnumber.h> QT_BEGIN_NAMESPACE @@ -625,31 +624,17 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) << tagValue("RootNamespace", tool.Name) << tagValue("Keyword", tool.Keyword); - QString windowsTargetPlatformVersion; if (isWinRT) { xml << tagValue("MinimumVisualStudioVersion", tool.Version) << tagValue("DefaultLanguage", "en") << tagValue("AppContainerApplication", "true") << tagValue("ApplicationType", "Windows Store") << tagValue("ApplicationTypeRevision", tool.SdkVersion); - if (tool.SdkVersion == "10.0") - windowsTargetPlatformVersion = qgetenv("UCRTVERSION"); - } else { - QByteArray winSDKVersionStr = qgetenv("WindowsSDKVersion").trimmed(); - - // This environment variable might end with a backslash due to a VS bug. - if (winSDKVersionStr.endsWith('\\')) - winSDKVersionStr.chop(1); - - QVersionNumber winSDKVersion = QVersionNumber::fromString( - QString::fromLocal8Bit(winSDKVersionStr)); - if (!winSDKVersion.isNull()) - windowsTargetPlatformVersion = winSDKVersionStr; - } - if (!windowsTargetPlatformVersion.isEmpty()) { - xml << tagValue("WindowsTargetPlatformVersion", windowsTargetPlatformVersion) - << tagValue("WindowsTargetPlatformMinVersion", windowsTargetPlatformVersion); } + if (!tool.WindowsTargetPlatformVersion.isEmpty()) + xml << tagValue("WindowsTargetPlatformVersion", tool.WindowsTargetPlatformVersion); + if (!tool.WindowsTargetPlatformMinVersion.isEmpty()) + xml << tagValue("WindowsTargetPlatformMinVersion", tool.WindowsTargetPlatformMinVersion); xml << closetag(); diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 7335211f30..cf0b96ec9f 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2214,8 +2214,49 @@ void VCFilter::addFiles(const ProStringList& fileList) void VCFilter::modifyPCHstage(QString str) { - bool autogenSourceFile = Project->autogenPrecompCPP; - bool pchThroughSourceFile = !Project->precompCPP.isEmpty(); + const bool isHFile = (str == Project->precompH); + const bool pchThroughSourceFile = !Project->precompSource.isEmpty(); + if (isHFile && pchThroughSourceFile && Project->autogenPrecompSource) { + useCustomBuildTool = true; + QString toFile(Project->precompSource); + CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ..."; + CustomBuildTool.Outputs += toFile; + + QStringList lines; + CustomBuildTool.CommandLine += + "echo /*-------------------------------------------------------------------- >" + toFile; + lines << "* Precompiled header source file used by Visual Studio.NET to generate"; + lines << "* the .pch file."; + lines << "*"; + lines << "* Due to issues with the dependencies checker within the IDE, it"; + lines << "* sometimes fails to recompile the PCH file, if we force the IDE to"; + lines << "* create the PCH file directly from the header file."; + lines << "*"; + lines << "* This file is auto-generated by qmake since no PRECOMPILED_SOURCE was"; + lines << "* specified, and is used as the common stdafx.cpp. The file is only"; + lines << QLatin1String("* generated when creating ") + + (Config->CompilerVersion < NET2010 ? ".vcproj" : ".vcxproj") + + " project files, and is not used for"; + lines << "* command line compilations by nmake."; + lines << "*"; + lines << "* WARNING: All changes made in this file will be lost."; + lines << "--------------------------------------------------------------------*/"; + lines << "#include \"" + Project->precompHFilename + "\""; + for (const QString &line : qAsConst(lines)) + CustomBuildTool.CommandLine += "echo " + line + ">>" + toFile; + return; + } + + useCompilerTool = true; + const bool isPrecompSource = pchThroughSourceFile && (str == Project->precompSource); + if (isPrecompSource) { + CompilerTool.UsePrecompiledHeader = pchCreateUsingSpecific; + if (Project->autogenPrecompSource) + CompilerTool.PrecompiledHeaderThrough = Project->precompHFilename; + CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)"); + return; + } + bool isCFile = false; for (QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) { if (str.endsWith(*it)) { @@ -2223,53 +2264,13 @@ void VCFilter::modifyPCHstage(QString str) break; } } - const bool isHFile = (str == Project->precompH); - bool isCPPFile = pchThroughSourceFile && (str == Project->precompCPP); - - if(!isCFile && !isHFile && !isCPPFile) - return; - - if(isHFile && pchThroughSourceFile) { - if (autogenSourceFile) { - useCustomBuildTool = true; - QString toFile(Project->precompCPP); - CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ..."; - CustomBuildTool.Outputs += toFile; - - QStringList lines; - CustomBuildTool.CommandLine += - "echo /*-------------------------------------------------------------------- >" + toFile; - lines << "* Precompiled header source file used by Visual Studio.NET to generate"; - lines << "* the .pch file."; - lines << "*"; - lines << "* Due to issues with the dependencies checker within the IDE, it"; - lines << "* sometimes fails to recompile the PCH file, if we force the IDE to"; - lines << "* create the PCH file directly from the header file."; - lines << "*"; - lines << "* This file is auto-generated by qmake since no PRECOMPILED_SOURCE was"; - lines << "* specified, and is used as the common stdafx.cpp. The file is only"; - lines << QLatin1String("* generated when creating ") - + (Config->CompilerVersion < NET2010 ? ".vcproj" : ".vcxproj") - + " project files, and is not used for"; - lines << "* command line compilations by nmake."; - lines << "*"; - lines << "* WARNING: All changes made in this file will be lost."; - lines << "--------------------------------------------------------------------*/"; - lines << "#include \"" + Project->precompHFilename + "\""; - for (const QString &line : qAsConst(lines)) - CustomBuildTool.CommandLine += "echo " + line + ">>" + toFile; - } - return; - } - useCompilerTool = true; - // Setup PCH options - CompilerTool.UsePrecompiledHeader = (isCFile ? pchNone : pchCreateUsingSpecific); - if (isCFile) + bool pchCompatible = (isCFile == Project->pchIsCFile); + if (!pchCompatible) { + CompilerTool.UsePrecompiledHeader = pchNone; CompilerTool.PrecompiledHeaderThrough = QLatin1String("$(NOINHERIT)"); - else if (autogenSourceFile) - CompilerTool.PrecompiledHeaderThrough = Project->precompHFilename; - CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)"); + CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)"); + } } VCFilterFile VCFilter::findFile(const QString &filePath, bool *found) const diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index 41a6ffafa7..33a96bf85e 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -1124,6 +1124,8 @@ public: QString SccLocalPath; QString PlatformName; QString SdkVersion; + QString WindowsTargetPlatformVersion; + QString WindowsTargetPlatformMinVersion; // Single projects QList<VCProjectSingleConfig> SingleProjects; diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index be0b67a9e6..06a96f7538 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -193,6 +193,10 @@ bool VcprojGenerator::writeProjectMakefile() mergedProject.SccProjectName = mergedProjects.at(0)->vcProject.SccProjectName; mergedProject.SccLocalPath = mergedProjects.at(0)->vcProject.SccLocalPath; mergedProject.PlatformName = mergedProjects.at(0)->vcProject.PlatformName; + mergedProject.WindowsTargetPlatformVersion = + project->first("WINDOWS_TARGET_PLATFORM_VERSION").toQString(); + mergedProject.WindowsTargetPlatformMinVersion = + project->first("WINDOWS_TARGET_PLATFORM_MIN_VERSION").toQString(); XmlOutput xmlOut(t); projectWriter->write(xmlOut, mergedProject); @@ -477,8 +481,8 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt // Add all unknown libs to the deps QStringList where = QStringList() << "LIBS" << "LIBS_PRIVATE" << "QMAKE_LIBS" << "QMAKE_LIBS_PRIVATE"; - for (QStringList::ConstIterator wit = where.begin(); - wit != where.end(); ++wit) { + for (QStringList::ConstIterator wit = where.cbegin(); + wit != where.cend(); ++wit) { const ProStringList &l = tmp_proj.values(ProKey(*wit)); for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { const QString opt = fixLibFlag(*it).toQString(); @@ -778,8 +782,9 @@ void VcprojGenerator::init() // Setup PCH variables precompH = project->first("PRECOMPILED_HEADER").toQString(); - precompCPP = project->first("PRECOMPILED_SOURCE").toQString(); - usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header"); + precompSource = project->first("PRECOMPILED_SOURCE").toQString(); + pchIsCFile = project->isActiveConfig("precompile_header_c"); + usePCH = !precompH.isEmpty() && (pchIsCFile || project->isActiveConfig("precompile_header")); if (usePCH) { precompHFilename = fileInfo(precompH).fileName(); // Created files @@ -793,13 +798,15 @@ void VcprojGenerator::init() project->values("PRECOMPILED_OBJECT") = ProStringList(precompObj); project->values("PRECOMPILED_PCH") = ProStringList(precompPch); - autogenPrecompCPP = precompCPP.isEmpty() && project->isActiveConfig("autogen_precompile_source"); - if (autogenPrecompCPP) { - precompCPP = precompH - + (Option::cpp_ext.count() ? Option::cpp_ext.at(0) : QLatin1String(".cpp")); - project->values("GENERATED_SOURCES") += precompCPP; - } else if (!precompCPP.isEmpty()) { - project->values("SOURCES") += precompCPP; + autogenPrecompSource = precompSource.isEmpty() && project->isActiveConfig("autogen_precompile_source"); + if (autogenPrecompSource) { + precompSource = precompH + + (pchIsCFile + ? (Option::c_ext.count() ? Option::c_ext.at(0) : QLatin1String(".c")) + : (Option::cpp_ext.count() ? Option::cpp_ext.at(0) : QLatin1String(".cpp"))); + project->values("GENERATED_SOURCES") += precompSource; + } else if (!precompSource.isEmpty()) { + project->values("SOURCES") += precompSource; } } diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index 0b9770e962..55d36c3762 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -57,15 +57,16 @@ public: ~VcprojGenerator(); QString defaultMakefile() const; - QString precompH, precompHFilename, precompCPP, + QString precompH, precompHFilename, precompSource, precompObj, precompPch; - bool autogenPrecompCPP; + bool autogenPrecompSource; static bool hasBuiltinCompiler(const QString &file); QHash<QString, QStringList> extraCompilerSources; QHash<QString, QString> extraCompilerOutputs; const QString customBuildToolFilterFileSuffix; bool usePCH; + bool pchIsCFile = false; VCProjectWriter *projectWriter; protected: diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 6046e5791e..a855fcd0a5 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -114,8 +114,8 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) goto found; } QString libBase = (*dir_it).local() + '/' + lib + verovr; - for (ProStringList::ConstIterator extit = impexts.begin(); - extit != impexts.end(); ++extit) { + for (ProStringList::ConstIterator extit = impexts.cbegin(); + extit != impexts.cend(); ++extit) { if (exists(libBase + '.' + *extit)) { (*it) = cand + verovr + '.' + *extit; goto found; diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 432339d48e..ade8e15a39 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1190,7 +1190,7 @@ bool QMakeEvaluator::loadSpecInternal() # ifdef Q_OS_UNIX if (m_qmakespec.endsWith(QLatin1String("/default-host")) || m_qmakespec.endsWith(QLatin1String("/default"))) { - QString rspec = QFileInfo(m_qmakespec).readLink(); + QString rspec = QFileInfo(m_qmakespec).symLinkTarget(); if (!rspec.isEmpty()) m_qmakespec = QDir::cleanPath(QDir(m_qmakespec).absoluteFilePath(rspec)); } diff --git a/qmake/property.cpp b/qmake/property.cpp index c0a3ec0dab..432ff55664 100644 --- a/qmake/property.cpp +++ b/qmake/property.cpp @@ -178,8 +178,8 @@ QMakeProperty::exec() } return true; } - for(QStringList::ConstIterator it = Option::prop::properties.begin(); - it != Option::prop::properties.end(); it++) { + for (QStringList::ConstIterator it = Option::prop::properties.cbegin(); + it != Option::prop::properties.cend(); it++) { if(Option::prop::properties.count() > 1) fprintf(stdout, "%s:", (*it).toLatin1().constData()); const ProKey pkey(*it); @@ -191,11 +191,11 @@ QMakeProperty::exec() } } } else if(Option::qmake_mode == Option::QMAKE_SET_PROPERTY) { - for(QStringList::ConstIterator it = Option::prop::properties.begin(); - it != Option::prop::properties.end(); it++) { + for (QStringList::ConstIterator it = Option::prop::properties.cbegin(); + it != Option::prop::properties.cend(); it++) { QString var = (*it); it++; - if(it == Option::prop::properties.end()) { + if (it == Option::prop::properties.cend()) { ret = false; break; } @@ -203,8 +203,8 @@ QMakeProperty::exec() setValue(var, (*it)); } } else if(Option::qmake_mode == Option::QMAKE_UNSET_PROPERTY) { - for(QStringList::ConstIterator it = Option::prop::properties.begin(); - it != Option::prop::properties.end(); it++) { + for (QStringList::ConstIterator it = Option::prop::properties.cbegin(); + it != Option::prop::properties.cend(); it++) { QString var = (*it); if(!var.startsWith(".")) remove(var); |