summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/productbuilddata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/buildgraph/productbuilddata.cpp')
-rw-r--r--src/lib/buildgraph/productbuilddata.cpp40
1 files changed, 37 insertions, 3 deletions
diff --git a/src/lib/buildgraph/productbuilddata.cpp b/src/lib/buildgraph/productbuilddata.cpp
index a8d0841a8..e29ae96a5 100644
--- a/src/lib/buildgraph/productbuilddata.cpp
+++ b/src/lib/buildgraph/productbuilddata.cpp
@@ -41,18 +41,52 @@ namespace Internal {
ProductBuildData::~ProductBuildData()
{
- qDeleteAll(artifacts);
+ qDeleteAll(nodes);
+}
+
+void ProductBuildData::registerAddedFileTag(const FileTag &fileTag, Artifact *artifact)
+{
+ m_addedArtifactsByFileTag[fileTag].insert(artifact);
+}
+
+void ProductBuildData::registerAddedArtifact(Artifact *artifact)
+{
+ foreach (const FileTag &tag, artifact->fileTags)
+ m_addedArtifactsByFileTag[tag].insert(artifact);
+}
+
+void ProductBuildData::registerRemovedFileTag(const FileTag &fileTag, Artifact *artifact)
+{
+ m_removedArtifactsByFileTag[fileTag].insert(artifact);
+}
+
+void ProductBuildData::registerRemovedArtifact(Artifact *artifact)
+{
+ foreach (const FileTag &tag, artifact->fileTags)
+ m_removedArtifactsByFileTag[tag].insert(artifact);
+}
+
+const ArtifactSet ProductBuildData::addedArtifactsByFileTag(const FileTag &tag) const
+{
+ return m_addedArtifactsByFileTag.value(tag);
+}
+
+const ArtifactSet ProductBuildData::removedArtifactsByFileTag(const FileTag &tag) const
+{
+ return m_removedArtifactsByFileTag.value(tag);
}
void ProductBuildData::load(PersistentPool &pool)
{
- pool.loadContainer(artifacts);
+ nodes.load(pool);
+ roots.load(pool);
pool.loadContainer(targetArtifacts);
}
void ProductBuildData::store(PersistentPool &pool) const
{
- pool.storeContainer(artifacts);
+ nodes.store(pool);
+ roots.store(pool);
pool.storeContainer(targetArtifacts);
}