summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/buildgraphloader.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-09-10 16:08:37 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-09-11 08:20:47 +0200
commit58a907db9a96b4a21c1ead744a04529a4641b708 (patch)
tree50cd3cf16db5859cb2780bfe37d824fa8891116f /src/lib/buildgraph/buildgraphloader.h
parent49ebbc396cc0276dace901b67b9e974750b50f81 (diff)
downloadqbs-58a907db9a96b4a21c1ead744a04529a4641b708.tar.gz
Fix a number of bugs uncovered by a recent leak fix (ff5b33b82b).
To name just a few: - Product removal, adaptation and re-resolving/swapping build data was done in the wrong order, resulting in outdated information still being present and necessary new one not being there yet. - Outdated artifacts were deleted too early, so that look-ups into the old project build data would cause undefined behavior. - The list of products whose file list was changed could contain the same entry twice, causing asserts when the same code was run again for the same product. Change-Id: I0c318fb18d5a8293d863ea6802203200941b9b7b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/buildgraphloader.h')
-rw-r--r--src/lib/buildgraph/buildgraphloader.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/buildgraph/buildgraphloader.h b/src/lib/buildgraph/buildgraphloader.h
index c2a413f60..f13749f26 100644
--- a/src/lib/buildgraph/buildgraphloader.h
+++ b/src/lib/buildgraph/buildgraphloader.h
@@ -43,6 +43,7 @@ class SetupProjectParameters;
namespace Internal {
class ArtifactList;
class FileDependency;
+class FileResourceBase;
class FileTime;
class Property;
@@ -58,6 +59,7 @@ class BuildGraphLoader
{
public:
BuildGraphLoader(const QProcessEnvironment &env, const Logger &logger);
+ ~BuildGraphLoader();
BuildGraphLoadResult load(const SetupProjectParameters &parameters,
const RulesEvaluationContextPtr &evalContext);
@@ -85,8 +87,8 @@ private:
const ResolvedProductPtr &newlyResolvedProduct);
void onProductRemoved(const ResolvedProductPtr &product, ProjectBuildData *projectBuildData,
bool removeArtifactsFromDisk = true);
- void onProductFileListChanged(const ResolvedProductPtr &product,
- const ResolvedProductPtr &changedProduct);
+ void onProductFileListChanged(const ResolvedProductPtr &restoredProduct,
+ const ResolvedProductPtr &newlyResolvedProduct, const ProjectBuildData *oldBuildData);
void removeArtifactAndExclusiveDependents(Artifact *artifact,
ArtifactList *removedArtifacts = 0);
bool checkForPropertyChanges(const TransformerConstPtr &restoredTrafo,
@@ -103,6 +105,9 @@ private:
BuildGraphLoadResult m_result;
Logger m_logger;
QProcessEnvironment m_environment;
+
+ // These must only be deleted at the end so we can still peek into the old look-up table.
+ QList<FileResourceBase *> m_objectsToDelete;
};
} // namespace Internal