diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-07-21 14:07:14 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-07-21 14:37:01 +0200 |
commit | 59824dc9fa926cd9edb7acc8db1c642f2b49534a (patch) | |
tree | ce89406b1d6806ba3258f0fe2276ed326a4d9b07 /src/lib | |
parent | 2cbbe6c6141572500e137acbfd8104328e6dbded (diff) |
Add artifact to transformer outputs earlier.
Namely, at the same time we set the transformer on the artifact.
Otherwise there will be a time window where the build graph is
inconsistent (and there'd probably be a memory leak as well).
Change-Id: Ief5d253e672ffcd76dfceab1572a5dcfdf4cdaa3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/corelib/buildgraph/rulesapplicator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp index f256d6bd0..6d1e31a3d 100644 --- a/src/lib/corelib/buildgraph/rulesapplicator.cpp +++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp @@ -187,7 +187,6 @@ void RulesApplicator::doApply(const ArtifactSet &inputArtifacts, QScriptValue &p foreach (Artifact *dependency, m_product->lookupArtifactsByFileTag(fileTag)) loggedConnect(outputArtifact, dependency, m_logger); - m_transformer->outputs.insert(outputArtifact); outputArtifact->product->unregisterArtifactWithChangedInputs(outputArtifact); } @@ -352,6 +351,7 @@ Artifact *RulesApplicator::createOutputArtifact(const QString &filePath, const F m_transformer->inputs = inputArtifacts; } outputArtifact->transformer = m_transformer; + m_transformer->outputs.insert(outputArtifact); QBS_CHECK(m_rule->multiplex || m_transformer->inputs.count() == 1); return outputArtifact; |