diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-11 14:50:41 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-12 08:34:06 +0000 |
commit | f152d9e4ecaf4c36abb7270dfa5ab7747927ac32 (patch) | |
tree | e231f596ca39fba55683e808608aef20ceded370 /src/lib/corelib/buildgraph/executor.cpp | |
parent | c45cd4a943dfbbc9c54f65ec2ab5250e9b5ba1cb (diff) |
RuleNode: Clarify that the returned node sets contain artifacts
The naming of these sets and the code that handled them in the Executor
suggested that they could contain other types of nodes as well.
Change-Id: I6443f07a3615eff166965a5203002797200924b0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/executor.cpp')
-rw-r--r-- | src/lib/corelib/buildgraph/executor.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp index 1012a1d4e..8950577f8 100644 --- a/src/lib/corelib/buildgraph/executor.cpp +++ b/src/lib/corelib/buildgraph/executor.cpp @@ -497,17 +497,16 @@ void Executor::executeRuleNode(RuleNode *ruleNode) qCDebug(lcExec).noquote() << ruleNode->toString(); const WeakPointer<ResolvedProduct> &product = ruleNode->product; Set<RuleNode *> parentRules; - if (!result.createdNodes.empty()) { + if (!result.createdArtifacts.empty()) { for (BuildGraphNode *parent : qAsConst(ruleNode->parents)) { if (parent->type() == BuildGraphNode::RuleNodeType) parentRules += static_cast<RuleNode *>(parent); } } - for (BuildGraphNode *node : qAsConst(result.createdNodes)) { + for (BuildGraphNode *node : qAsConst(result.createdArtifacts)) { qCDebug(lcExec).noquote() << "rule created" << node->toString(); Internal::connect(node, ruleNode); - if (node->type() != BuildGraphNode::ArtifactNodeType) - continue; + QBS_CHECK(node->type() == BuildGraphNode::ArtifactNodeType); Artifact * const outputArtifact = static_cast<Artifact *>(node); if (outputArtifact->fileTags().intersects(product->fileTags)) product->buildData->addRootNode(outputArtifact); @@ -518,8 +517,8 @@ void Executor::executeRuleNode(RuleNode *ruleNode) for (RuleNode *parentRule : qAsConst(parentRules)) Internal::connect(parentRule, outputArtifact); } - updateLeaves(result.createdNodes); - updateLeaves(result.invalidatedNodes); + updateLeaves(result.createdArtifacts); + updateLeaves(result.invalidatedArtifacts); } finishNode(ruleNode); if (m_progressObserver) |