diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-09-09 15:32:20 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-09-10 10:05:33 +0200 |
commit | ffa686782af8c494a3c96967e22c0307c10b1b80 (patch) | |
tree | 4a30d0b579b85e930232835ab30ea40e53d33bff | |
parent | 247d0b8de800b80aef61176ad672c4f0225a209e (diff) |
Do not clear Artifact::product in removeArtifact().v1.3.1
This is too early in the case of change tracking; we still do a couple
of things with the old build data afterwards.
Change-Id: I843e364288ed7b05bcb7d03386c102212ec18690
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r-- | src/lib/corelib/buildgraph/buildgraphloader.cpp | 5 | ||||
-rw-r--r-- | src/lib/corelib/buildgraph/projectbuilddata.cpp | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraphloader.cpp b/src/lib/corelib/buildgraph/buildgraphloader.cpp index 62749643a..6f1b62212 100644 --- a/src/lib/corelib/buildgraph/buildgraphloader.cpp +++ b/src/lib/corelib/buildgraph/buildgraphloader.cpp @@ -336,6 +336,11 @@ void BuildGraphLoader::trackProjectChanges() EmptyDirectoriesRemover(m_result.newlyResolvedProject.data(), m_logger) .removeEmptyParentDirectories(m_artifactsRemovedFromDisk); + foreach (FileResourceBase * const f, m_objectsToDelete) { + Artifact * const a = dynamic_cast<Artifact *>(f); + if (a) + a->product.clear(); // To help with the sanity checks. + } doSanityChecks(m_result.newlyResolvedProject, m_logger); } diff --git a/src/lib/corelib/buildgraph/projectbuilddata.cpp b/src/lib/corelib/buildgraph/projectbuilddata.cpp index c53cb9311..bc0babb9f 100644 --- a/src/lib/corelib/buildgraph/projectbuilddata.cpp +++ b/src/lib/corelib/buildgraph/projectbuilddata.cpp @@ -299,7 +299,6 @@ void ProjectBuildData::removeArtifact(Artifact *artifact, artifact->product->buildData->nodes.remove(artifact); artifact->product->buildData->roots.remove(artifact); removeArtifactFromSet(artifact, artifact->product->buildData->artifactsByFileTag); - artifact->product.clear(); } isDirty = true; } |