aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/corelib/buildgraph/productbuilddata.cpp23
-rw-r--r--src/lib/corelib/buildgraph/productbuilddata.h1
-rw-r--r--src/lib/corelib/language/language.h1
-rw-r--r--src/lib/corelib/tools/persistence.cpp2
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp2
5 files changed, 22 insertions, 7 deletions
diff --git a/src/lib/corelib/buildgraph/productbuilddata.cpp b/src/lib/corelib/buildgraph/productbuilddata.cpp
index cdd3874e7..eb0e4c03b 100644
--- a/src/lib/corelib/buildgraph/productbuilddata.cpp
+++ b/src/lib/corelib/buildgraph/productbuilddata.cpp
@@ -68,10 +68,10 @@ void ProductBuildData::load(PersistentPool &pool)
{
nodes.load(pool);
roots.load(pool);
- int rescuableArtifactCount;
- pool.stream() >> rescuableArtifactCount;
- rescuableArtifactData.reserve(rescuableArtifactCount);
- for (int i = 0; i < rescuableArtifactCount; ++i) {
+ int count;
+ pool.stream() >> count;
+ rescuableArtifactData.reserve(count);
+ for (int i = 0; i < count; ++i) {
const QString filePath = pool.idLoadString();
RescuableArtifactData elem;
elem.load(pool);
@@ -79,6 +79,14 @@ void ProductBuildData::load(PersistentPool &pool)
}
loadArtifactSetByFileTag(pool, addedArtifactsByFileTag);
loadArtifactSetByFileTag(pool, removedArtifactsByFileTag);
+
+ pool.stream() >> count;
+ for (int i = 0; i < count; ++i) {
+ const RulePtr r = pool.idLoadS<Rule>();
+ ArtifactSet s;
+ pool.loadContainer(s);
+ artifactsWithChangedInputsPerRule.insert(r, s);
+ }
}
static void storeArtifactSetByFileTag(PersistentPool &pool,
@@ -104,6 +112,13 @@ void ProductBuildData::store(PersistentPool &pool) const
}
storeArtifactSetByFileTag(pool, addedArtifactsByFileTag);
storeArtifactSetByFileTag(pool, removedArtifactsByFileTag);
+
+ pool.stream() << artifactsWithChangedInputsPerRule.count();
+ for (ArtifactSetByRule::ConstIterator it = artifactsWithChangedInputsPerRule.constBegin();
+ it != artifactsWithChangedInputsPerRule.constEnd(); ++it) {
+ pool.store(it.key());
+ pool.storeContainer(it.value());
+ }
}
void addArtifactToSet(Artifact *artifact, ProductBuildData::ArtifactSetByFileTag &container)
diff --git a/src/lib/corelib/buildgraph/productbuilddata.h b/src/lib/corelib/buildgraph/productbuilddata.h
index 10b4655be..8d1810b2b 100644
--- a/src/lib/corelib/buildgraph/productbuilddata.h
+++ b/src/lib/corelib/buildgraph/productbuilddata.h
@@ -66,7 +66,6 @@ public:
ArtifactSetByFileTag addedArtifactsByFileTag;
ArtifactSetByFileTag removedArtifactsByFileTag;
- // TODO: Serialize.
typedef QHash<RuleConstPtr, ArtifactSet> ArtifactSetByRule;
ArtifactSetByRule artifactsWithChangedInputsPerRule;
diff --git a/src/lib/corelib/language/language.h b/src/lib/corelib/language/language.h
index c1e4f63fb..d2b79a74f 100644
--- a/src/lib/corelib/language/language.h
+++ b/src/lib/corelib/language/language.h
@@ -303,7 +303,6 @@ public:
FileTags staticOutputFileTags() const;
FileTags collectedOutputFileTags() const;
bool isDynamic() const;
-
private:
Rule() : multiplex(false), ruleGraphId(-1) {}
diff --git a/src/lib/corelib/tools/persistence.cpp b/src/lib/corelib/tools/persistence.cpp
index cc751f889..22fe6e168 100644
--- a/src/lib/corelib/tools/persistence.cpp
+++ b/src/lib/corelib/tools/persistence.cpp
@@ -40,7 +40,7 @@
namespace qbs {
namespace Internal {
-static const char QBS_PERSISTENCE_MAGIC[] = "QBSPERSISTENCE-62";
+static const char QBS_PERSISTENCE_MAGIC[] = "QBSPERSISTENCE-63";
PersistentPool::PersistentPool(const Logger &logger) : m_logger(logger)
{
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 105af71a8..b4364cddc 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -856,6 +856,8 @@ void TestBlackbox::trackRemoveFile()
QFile::copy("../before/main.cpp", "main.cpp");
QVERIFY(QFile::remove("zort.h"));
QVERIFY(QFile::remove("zort.cpp"));
+ QCOMPARE(runQbs(QbsRunParameters(QLatin1String("resolve"))), 0);
+
touch("main.cpp");
touch("project.qbs");
QCOMPARE(runQbs(), 0);