diff options
author | Liang Qi <liang.qi@qt.io> | 2019-08-27 09:45:52 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-08-27 09:45:52 +0200 |
commit | 0f1f7fb97fd0dd572ad61a0ebaef68c2bba72e57 (patch) | |
tree | e1f3f1b58aa69904e6bc629e88ed68fca858f83a /qmake/generators/win32/msbuild_objectmodel.cpp | |
parent | e8c70fb07f01b492b721451c00496f860eb40be0 (diff) | |
parent | 5bb178c479a247720fbc3fbb7f06a32b725193ac (diff) |
Merge remote-tracking branch 'origin/dev' into 5.14
Conflicts:
src/widgets/kernel/qwidget.cpp
src/widgets/kernel/qwidget_p.h
src/widgets/kernel/qwidgetrepaintmanager.cpp
src/widgets/kernel/qwidgetwindow.cpp
tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
Diffstat (limited to 'qmake/generators/win32/msbuild_objectmodel.cpp')
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 3116238aa0..0515c7404f 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -300,14 +300,17 @@ inline XmlOutput::xml_output valueTagT( const triState v) return valueTag(v == _True ? "true" : "false"); } -static QString vcxCommandSeparator() +static QString commandLinesForOutput(QStringList commands) { // MSBuild puts the contents of the custom commands into a batch file and calls it. // As we want every sub-command to be error-checked (as is done by makefile-based // backends), we insert the checks ourselves, using the undocumented jump target. - static QString cmdSep = - QLatin1String("
if errorlevel 1 goto VCEnd
"); - return cmdSep; + static QString errchk = QStringLiteral("if errorlevel 1 goto VCEnd"); + for (int i = commands.count() - 2; i >= 0; --i) { + if (!commands.at(i).startsWith("rem", Qt::CaseInsensitive)) + commands.insert(i + 1, errchk); + } + return commands.join('\n'); } static QString unquote(const QString &value) @@ -1658,7 +1661,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCustomBuildTool &tool) { xml << tag("Command") << attrTag("Condition", condition) - << valueTag(tool.CommandLine.join(vcxCommandSeparator())); + << valueTag(commandLinesForOutput(tool.CommandLine)); } if ( !tool.Description.isEmpty() ) @@ -1712,7 +1715,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCEventTool &tool) { xml << tag(tool.EventName) - << tag(_Command) << valueTag(tool.CommandLine.join(vcxCommandSeparator())) + << tag(_Command) << valueTag(commandLinesForOutput(tool.CommandLine)) << tag(_Message) << valueTag(tool.Description) << closetag(tool.EventName); } |