summaryrefslogtreecommitdiff
path: root/src/lib/corelib/buildgraph
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-11-14 16:07:28 +0100
committerJake Petroules <jake.petroules@qt.io>2017-11-15 11:56:53 +0000
commit9da21f445ff860ece50036326e23c232f64ac15e (patch)
tree79affb607296f767b009dc053abe2261d49fa1f5 /src/lib/corelib/buildgraph
parent6e9ac907c5427fdf5f764a5736e9edf4db8d49d2 (diff)
downloadqbs-9da21f445ff860ece50036326e23c232f64ac15e.tar.gz
Do not store argument names in ScriptFunction objects
These are fixed and always available from the calling context. Change-Id: Ibdf55de1fdb0c1819ae8afa6d44e54ebb3e126d7 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph')
-rw-r--r--src/lib/corelib/buildgraph/rulesapplicator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp
index 8f979b2fa..3bac97e7e 100644
--- a/src/lib/corelib/buildgraph/rulesapplicator.cpp
+++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp
@@ -183,8 +183,7 @@ void RulesApplicator::doApply(const ArtifactSet &inputArtifacts, QScriptValue &p
copyProperty(QLatin1String("project"), prepareScriptContext, scope());
if (m_rule->isDynamic()) {
outputArtifacts = runOutputArtifactsScript(inputArtifacts,
- ScriptEngine::argumentList(m_rule->outputArtifactsScript->argumentNames,
- scope()));
+ ScriptEngine::argumentList(Rule::argumentNamesForOutputArtifacts(), scope()));
ArtifactSet newOutputs = ArtifactSet::fromList(outputArtifacts);
const ArtifactSet oldOutputs = collectOldOutputArtifacts(inputArtifacts);
handleRemovedRuleOutputs(m_completeInputSet, oldOutputs - newOutputs, m_logger);
@@ -249,7 +248,7 @@ void RulesApplicator::doApply(const ArtifactSet &inputArtifacts, QScriptValue &p
m_transformer->setupOutputs(prepareScriptContext);
m_transformer->createCommands(engine(), m_rule->prepareScript,
- ScriptEngine::argumentList(m_rule->prepareScript->argumentNames, prepareScriptContext));
+ ScriptEngine::argumentList(Rule::argumentNamesForPrepare(), prepareScriptContext));
if (Q_UNLIKELY(m_transformer->commands.isEmpty()))
throw ErrorInfo(Tr::tr("There is a rule without commands: %1.")
.arg(m_rule->toString()), m_rule->prepareScript->location);