aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-01-22 12:53:40 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2018-01-23 09:16:08 +0000
commitabff4b1b9b9b76e9b00b5a73108852e6f8e3e5d4 (patch)
treed18141f7ffd015fd45904700d19293d6c7b05050 /tests/auto
parent901bf1f7749e79a9fae2999d50131496dcaf4036 (diff)
Make ProductBuildData a proper class with accessors and modifiers
We will need to keep track of some mutating accesses in a follow-up change. Change-Id: I8b3c92f6cca0f5dceb35ef7559cc1357cdf38656 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/buildgraph/tst_buildgraph.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/auto/buildgraph/tst_buildgraph.cpp b/tests/auto/buildgraph/tst_buildgraph.cpp
index b83e30c3f..626c1e9e7 100644
--- a/tests/auto/buildgraph/tst_buildgraph.cpp
+++ b/tests/auto/buildgraph/tst_buildgraph.cpp
@@ -89,8 +89,9 @@ ResolvedProductConstPtr TestBuildGraph::productWithDirectCycle()
root->product = product;
auto child = new Artifact;
child->product = product;
- product->buildData->roots.insert(root);
- product->buildData->nodes << root << child;
+ product->buildData->addRootNode(root);
+ product->buildData->addNode(root);
+ product->buildData->addNode(child);
qbs::Internal::connect(root, child);
qbs::Internal::connect(child, root);
return product;
@@ -107,8 +108,10 @@ ResolvedProductConstPtr TestBuildGraph::productWithLessDirectCycle()
root->product = product;
child->product = product;
grandchild->product = product;
- product->buildData->roots << root;
- product->buildData->nodes << root << child << grandchild;
+ product->buildData->addRootNode(root);
+ product->buildData->addNode(root);
+ product->buildData->addNode(child);
+ product->buildData->addNode(grandchild);
qbs::Internal::connect(root, child);
qbs::Internal::connect(child, grandchild);
qbs::Internal::connect(grandchild, root);
@@ -125,8 +128,10 @@ ResolvedProductConstPtr TestBuildGraph::productWithNoCycle()
auto root2 = new Artifact;
root->product = product;
root2->product = product;
- product->buildData->roots << root << root2;
- product->buildData->nodes << root << root2;
+ product->buildData->addRootNode(root);
+ product->buildData->addRootNode(root2);
+ product->buildData->addNode(root);
+ product->buildData->addNode(root2);
qbs::Internal::connect(root2, root);
return product;
}