diff options
| author | Christian Kandeler <christian.kandeler@digia.com> | 2013-08-13 12:13:33 +0200 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-08-14 15:27:31 +0200 |
| commit | 594471f4af81b2fea86c789f6b905314d2cb2125 (patch) | |
| tree | 4d9a5116a14f3a35068892010be880e623c86546 /src/lib/buildgraph/buildgraph.cpp | |
| parent | ec9f0d7b949f27cff68e255c65b5d301f27851ad (diff) | |
| download | qbs-594471f4af81b2fea86c789f6b905314d2cb2125.tar.gz | |
Better handling of property changes when restoring a build graph.
If a property change is discovered in any given product, the current
code throws away the whole build graph, generates a new one and then re-
inserts selected data from the old one. With this patch, we only
regenerate the build data of the affected product (and still re-insert
some existing data into it as to not rebuild artifacts that are up to
date).
Change-Id: I49e475c66dfb84ad20253ab53daf25acfe5a738b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/buildgraph.cpp')
| -rw-r--r-- | src/lib/buildgraph/buildgraph.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/buildgraph/buildgraph.cpp b/src/lib/buildgraph/buildgraph.cpp index 4be34c644..9509a2f9b 100644 --- a/src/lib/buildgraph/buildgraph.cpp +++ b/src/lib/buildgraph/buildgraph.cpp @@ -315,11 +315,11 @@ QString relativeArtifactFileName(const Artifact *artifact) return str; } -Artifact *lookupArtifact(const ResolvedProductConstPtr &product, const QString &dirPath, - const QString &fileName) +Artifact *lookupArtifact(const ResolvedProductConstPtr &product, + const ProjectBuildData *projectBuildData, const QString &dirPath, const QString &fileName) { const QList<FileResourceBase *> lookupResults - = product->topLevelProject()->buildData->lookupFiles(dirPath, fileName); + = projectBuildData->lookupFiles(dirPath, fileName); for (QList<FileResourceBase *>::const_iterator it = lookupResults.constBegin(); it != lookupResults.constEnd(); ++it) { Artifact *artifact = dynamic_cast<Artifact *>(*it); @@ -329,6 +329,12 @@ Artifact *lookupArtifact(const ResolvedProductConstPtr &product, const QString & return 0; } +Artifact *lookupArtifact(const ResolvedProductConstPtr &product, const QString &dirPath, + const QString &fileName) +{ + return lookupArtifact(product, product->topLevelProject()->buildData.data(), dirPath, fileName); +} + Artifact *lookupArtifact(const ResolvedProductConstPtr &product, const QString &filePath) { QString dirPath, fileName; |
