aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/rulecommands.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-11-29 11:33:42 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-11-30 16:12:24 +0000
commit5cd5e8e958a91592a00f5b2fac54d71eb6903330 (patch)
tree43fd2c4142c9224177eb041ee6b2318c6036645f /src/lib/corelib/buildgraph/rulecommands.cpp
parentd4c00b33848a9155e2ae1b6002e9bb2c9d7dfcd7 (diff)
Fix autotests on Windows by re-adding weird conversion round-trip
Commit dd57e76a43 removed a seemingly nonsensical QScriptValue -> QString -> QScriptValue conversion, but without it, one autotest test inexplicably fails on Windows (namely propertiesInExportItems, which does not appear to be special in any way). Likely a QtScript issue. Let's re-add the magic. Change-Id: I83fbc62c2d5a1643ed8bba56e15531d2c42df3f9 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/rulecommands.cpp')
-rw-r--r--src/lib/corelib/buildgraph/rulecommands.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/corelib/buildgraph/rulecommands.cpp b/src/lib/corelib/buildgraph/rulecommands.cpp
index 5b180dd3d..e22f4cd84 100644
--- a/src/lib/corelib/buildgraph/rulecommands.cpp
+++ b/src/lib/corelib/buildgraph/rulecommands.cpp
@@ -286,9 +286,17 @@ void ProcessCommand::fillFromScriptValue(const QScriptValue *scriptValue, const
m_arguments = scriptValue->property(argumentsProperty()).toVariant().toStringList();
m_workingDir = scriptValue->property(workingDirProperty()).toString();
m_maxExitCode = scriptValue->property(maxExitCodeProperty()).toInt32();
- const QScriptValue stdoutFilterFunction = scriptValue->property(stdoutFilterFunctionProperty());
+
+ // toString() is required, presumably due to QtScript bug that manifests itself on Windows
+ const QScriptValue stdoutFilterFunction
+ = scriptValue->property(stdoutFilterFunctionProperty()).toString();
+
m_stdoutFilterFunction = invokedSourceCode(stdoutFilterFunction);
- const QScriptValue stderrFilterFunction = scriptValue->property(stderrFilterFunctionProperty());
+
+ // toString() is required, presumably due to QtScript bug that manifests itself on Windows
+ const QScriptValue stderrFilterFunction
+ = scriptValue->property(stderrFilterFunctionProperty()).toString();
+
m_stderrFilterFunction = invokedSourceCode(stderrFilterFunction);
m_relevantEnvVars = scriptValue->property(QStringLiteral("relevantEnvironmentVariables"))
.toVariant().toStringList();