summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/buildgraphloader.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-07-08 13:21:56 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2013-07-11 15:18:23 +0200
commitbf2a579903d44b8d856c5199044a96e803a79e1d (patch)
tree44b2ded616f72e71ac70e1987e1b9ef7569ea27e /src/lib/buildgraph/buildgraphloader.cpp
parentcaa33d6c287cb268e19809c49b97bce4b1b6b1c2 (diff)
downloadqbs-bf2a579903d44b8d856c5199044a96e803a79e1d.tar.gz
Make sure no remains of removed products stay in the build graph.
Namely, artifacts in transformer inputs of (former) parents. Task-number: QBS-358 Change-Id: I19e6cf6cd50e4d99c49e2e570daf163da25a3a79 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/buildgraphloader.cpp')
-rw-r--r--src/lib/buildgraph/buildgraphloader.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/buildgraph/buildgraphloader.cpp b/src/lib/buildgraph/buildgraphloader.cpp
index afb0ac090..ce04d91cc 100644
--- a/src/lib/buildgraph/buildgraphloader.cpp
+++ b/src/lib/buildgraph/buildgraphloader.cpp
@@ -324,12 +324,13 @@ void BuildGraphLoader::trackProjectChanges(const SetupProjectParameters &paramet
// Products still left in the list do not exist anymore.
foreach (const ResolvedProductPtr &removedProduct, allRestoredProducts)
- onProductRemoved(removedProduct);
+ onProductRemoved(removedProduct, m_result.newlyResolvedProject->buildData.data());
CycleDetector(m_logger).visitProject(m_result.newlyResolvedProject);
}
-void BuildGraphLoader::onProductRemoved(const ResolvedProductPtr &product)
+void BuildGraphLoader::onProductRemoved(const ResolvedProductPtr &product,
+ ProjectBuildData *projectBuildData)
{
m_logger.qbsDebug() << "[BG] product '" << product->name << "' removed.";
@@ -337,10 +338,8 @@ void BuildGraphLoader::onProductRemoved(const ResolvedProductPtr &product)
// delete all removed artifacts physically from the disk
if (product->buildData) {
- foreach (Artifact *artifact, product->buildData->artifacts) {
- artifact->disconnectAll(m_logger);
- removeGeneratedArtifactFromDisk(artifact, m_logger);
- }
+ foreach (Artifact *artifact, product->buildData->artifacts)
+ projectBuildData->removeArtifact(artifact, projectBuildData, m_logger);
}
}