diff options
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/doc/qmake.qdocconf | 2 | ||||
-rw-r--r-- | qmake/doc/snippets/code/doc_src_qmake-manual.pro | 17 | ||||
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 53 | ||||
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 60 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 4 |
6 files changed, 116 insertions, 24 deletions
diff --git a/qmake/doc/qmake.qdocconf b/qmake/doc/qmake.qdocconf index 9e1ad2f807..fb4a484ed7 100644 --- a/qmake/doc/qmake.qdocconf +++ b/qmake/doc/qmake.qdocconf @@ -27,6 +27,8 @@ exampledirs = snippets tagfile = qmake.tags +macro.qtbug = "\\l{https://bugreports.qt.io/browse/\1}{\1}" + depends += \ activeqt \ qt3d \ diff --git a/qmake/doc/snippets/code/doc_src_qmake-manual.pro b/qmake/doc/snippets/code/doc_src_qmake-manual.pro index d36d926b66..7973f40033 100644 --- a/qmake/doc/snippets/code/doc_src_qmake-manual.pro +++ b/qmake/doc/snippets/code/doc_src_qmake-manual.pro @@ -991,3 +991,20 @@ win32-g++:contains(QMAKE_HOST.arch, x86_64):{ ... } #! [187] + +#! [188] +translations_en.files = $$PWD/en.lproj/InfoPlist.strings +translations_en.path = en.lproj +QMAKE_BUNDLE_DATA += translations_en +#! [188] + +#! [189] +# Approach 1 +translations_en.files = $$PWD/InfoPlist.strings +translations_en.path = en.lproj + +# Approach 2 +translations_de.files = $$PWD/de.lproj/InfoPlist.strings + +QMAKE_BUNDLE_DATA += translations_en translations_de +#! [189] diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 2b58df073f..ab8787a81d 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1845,9 +1845,33 @@ \target QML_IMPORT_PATH \section1 QML_IMPORT_PATH - This variable is only used by \l{Qt Creator Manual}{Qt Creator}. + This variable is only used by \l{Qt Creator Manual}{Qt Creator}. If you have + an extra module that is kept outside of your Qt installation, you can + specify its path here. + See \l{Qt Creator: Using QML Modules with Plugins} for details. + \target QMLPATHS + \section1 QMLPATHS + + Expects a list of import paths that point to root directories of trees of + QML modules. For example, if you have a custom location for your QML + modules, you can specify it here. + + \note The path entries for QMLPATHS point to root directories of trees of + QML modules. This is the concept of import paths the QML engine understands. + You can pass the same paths via the \c QML_IMPORT_PATH \e environment variable + to your QML application, but they are \e different from the expected contents + of the \l QML_IMPORT_PATH \e qmake variable. The latter expects paths to + \e individual modules to be processed by Qt Creator only. + + \note The contents of QMLPATHS are \e not automatically passed to your + application. Rather, they are only used at build time. In particular, + qmlimportscanner uses them to find any QML modules it may need to mark as + imported by your application. + + \sa QQmlEngine::addImportPath() + \target QMAKE_systemvariable \section1 QMAKE @@ -1894,6 +1918,33 @@ See \l{Platform Notes#Creating Frameworks}{Platform Notes} for more information about creating library bundles. + A project can also use this variable to bundle application translation + files. The exact syntax depends on whether the project is using Xcode's + legacy build system or its new build system. + + For example when the following project snippet is built using the + legacy build system: + + \snippet code/doc_src_qmake-manual.pro 188 + + Xcode will ignore the original location of \c InfoPlist.strings + and the file will placed into the bundle \c Resources directory + under the provided \c translations_en.path path, so + \c Resources/en.lproj/InfoPlist.strings + + With the new build system, the relative location of the file is + preserved, which means the file will incorrectly be placed under + \c Resources/en.lproj/en.lproj/InfoPlist.strings + + To ensure correct file placement, the project can either move + the original file not to be in a sub-directory or it can choose + not to specify the \c translations_en.path variable. + + \snippet code/doc_src_qmake-manual.pro 189 + + See \qtbug QTBUG-98417 for more details on how the Xcode build + system changed its behavior in bundling translation files. + \section1 QMAKE_BUNDLE_EXTENSION \note This variable is used on \macos, iOS, tvOS, and watchOS only. diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 3ee4a260c0..f7ae426c91 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -1131,6 +1131,8 @@ static inline QString toString(optLinkTimeCodeGenType option) break; case optLTCGEnabled: return "UseLinkTimeCodeGeneration"; + case optLTCGIncremental: + return "UseFastLinkTimeCodeGeneration"; case optLTCGInstrument: return "PGInstrument"; case optLTCGOptimize: @@ -1164,6 +1166,8 @@ static inline QString toString(triState genDebugInfo, linkerDebugOption option) case _True: if (option == linkerDebugOptionFastLink) return "DebugFastLink"; + else if (option == linkerDebugOptionFull) + return "DebugFull"; return "true"; } return QString(); diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 94df594f40..b5d03f24dc 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -410,7 +410,7 @@ VCCLCompilerTool::VCCLCompilerTool() CompileForArchitecture(archUnknown), InterworkCalls(unset), EnablePREfast(unset), - DisplayFullPaths(unset), + DisplayFullPaths(_False), MultiProcessorCompilation(unset), GenerateXMLDocumentationFiles(unset), CreateHotpatchableImage(unset) @@ -1503,10 +1503,22 @@ bool VCLinkerTool::parseOption(const char* option) }else EnableUAC = _True; break; - case 0x3389797: // /DEBUG[:FASTLINK] - GenerateDebugInformation = _True; - if (config->CompilerVersion >= NET2015 && strcmp(option + 7, "FASTLINK") == 0) - DebugInfoOption = linkerDebugOptionFastLink; + case 0x3389797: // /DEBUG[:{FASTLINK|FULL|NONE}] + if (config->CompilerVersion >= NET2015) { + const char *str = option + 7; + if (qstricmp(str, "fastlink") == 0) + DebugInfoOption = linkerDebugOptionFastLink; + else if (qstricmp(str, "full") == 0) + DebugInfoOption = linkerDebugOptionFull; + else if (qstricmp(str, "none") == 0) + DebugInfoOption = linkerDebugOptionNone; + else + AdditionalOptions += option; + } + if (DebugInfoOption == linkerDebugOptionNone) + GenerateDebugInformation = _False; + else + GenerateDebugInformation = _True; break; case 0x0033896: // /DEF:filename ModuleDefinitionFile = option+5; @@ -1593,24 +1605,28 @@ bool VCLinkerTool::parseOption(const char* option) case 0x0d745c8: // /LIBPATH:dir AdditionalLibraryDirectories += option+9; break; - case 0x0341877: // /LTCG[:NOSTATUS|:STATUS] - config->WholeProgramOptimization = _True; - if (config->CompilerVersion >= NET2005) { - LinkTimeCodeGeneration = optLTCGEnabled; - if(*(option+5) == ':') { - const char* str = option+6; - if (*str == 'S') - ShowProgress = linkProgressAll; - else if (qstricmp(str, "pginstrument") == 0) - LinkTimeCodeGeneration = optLTCGInstrument; - else if (qstricmp(str, "pgoptimize") == 0) - LinkTimeCodeGeneration = optLTCGOptimize; - else if (qstricmp(str, "pgupdate") == 0) - LinkTimeCodeGeneration = optLTCGUpdate; - } - } else { - AdditionalOptions.append(option); + case 0x0341877: // /LTCG[:{INCREMENTAL|NOSTATUS|STATUS|OFF}] + // /LTCG:{PGINSTRUMENT|PGOPTIMIZE|PGUPDATE} + LinkTimeCodeGeneration = optLTCGEnabled; + if (*(option + 5) == ':') { + const char* str = option + 6; + if (qstricmp(str, "status") == 0) + ShowProgress = linkProgressAll; + else if (qstricmp(str, "off") == 0) + LinkTimeCodeGeneration = optLTCGDefault; + else if (qstricmp(str, "incremental") == 0) + LinkTimeCodeGeneration = optLTCGIncremental; + else if (qstricmp(str, "pginstrument") == 0) + LinkTimeCodeGeneration = optLTCGInstrument; + else if (qstricmp(str, "pgoptimize") == 0) + LinkTimeCodeGeneration = optLTCGOptimize; + else if (qstricmp(str, "pgupdate") == 0) + LinkTimeCodeGeneration = optLTCGUpdate; + else + AdditionalOptions.append(option); } + if (LinkTimeCodeGeneration != optLTCGDefault) + config->WholeProgramOptimization = _True; break; case 0x379ED25: case 0x157cf65: // /MACHINE:{AM33|ARM|CEE|IA64|X86|M32R|MIPS|MIPS16|MIPSFPU|MIPSFPU16|MIPSR41XX|PPC|SH3|SH4|SH5|THUMB|TRICORE} diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index b25205b226..6926328157 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -283,7 +283,8 @@ enum inlineExpansionOption { }; enum linkerDebugOption { linkerDebugOptionNone, - linkerDebugOptionFastLink + linkerDebugOptionFastLink, + linkerDebugOptionFull }; enum linkIncrementalType { linkIncrementalDefault, @@ -356,6 +357,7 @@ enum optWin98Type { enum optLinkTimeCodeGenType { optLTCGDefault, optLTCGEnabled, + optLTCGIncremental, optLTCGInstrument, optLTCGOptimize, optLTCGUpdate |