aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/rescuableartifactdata.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2016-12-15 14:05:07 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2016-12-16 10:16:40 +0000
commit7ebdd6ef8002e949469ed4dad4be8414dd0b2aab (patch)
tree4811ecfdafe0627bd6b7318fe43910ab409b46b6 /src/lib/corelib/buildgraph/rescuableartifactdata.h
parentf0b106759521ad64772b89047981b99c53926bd7 (diff)
PersistentPool: Prevent access to raw data stream
Instead, we employ our now-generic load/store interface for all serialization operations. The advantages are two-fold: 1) It can no longer happen that carelessly written store() functions mistakenly dump unshared strings into the build graph, as it has happened several times in the past. 2) We get rid of enormous amounts of custom code dealing with container (de)serialization. All of this is now done centrally by a handful of templates in PersistentPool. Change-Id: Ib1262da50989edda9726abd7d5a8ffdceaa0ec76 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/rescuableartifactdata.h')
-rw-r--r--src/lib/corelib/buildgraph/rescuableartifactdata.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/corelib/buildgraph/rescuableartifactdata.h b/src/lib/corelib/buildgraph/rescuableartifactdata.h
index 23685fa0d..741194cee 100644
--- a/src/lib/corelib/buildgraph/rescuableartifactdata.h
+++ b/src/lib/corelib/buildgraph/rescuableartifactdata.h
@@ -68,6 +68,23 @@ public:
const QString &c = QString(), bool byScanner = false)
: productName(n), productProfile(p), childFilePath(c), addedByScanner(byScanner)
{}
+
+ void load(PersistentPool &pool)
+ {
+ pool.load(productName);
+ pool.load(productProfile);
+ pool.load(childFilePath);
+ pool.load(addedByScanner);
+ }
+
+ void store(PersistentPool &pool) const
+ {
+ pool.store(productName);
+ pool.store(productProfile);
+ pool.store(childFilePath);
+ pool.store(addedByScanner);
+ }
+
QString productName;
QString productProfile;
QString childFilePath;