aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/resolvedfilecontext.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-02-13 17:46:20 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2018-02-16 12:15:15 +0000
commit56dcc749218b6365acef5721157d7eb4591bd5b2 (patch)
treea03cea05418a743b0fca5b27ff487856c978f404 /src/lib/corelib/language/resolvedfilecontext.h
parentbca41151f08e2b198bd6ac1da1603d6933c9166a (diff)
Remove most load() and store() methods
For all serializable types whose load() and store() methods simply forward these calls to their members, the methods are removed. Instead, the serialization is now done by the persistence facility itself, which detects such classes by the presence of a member template with a fixed name (using SFINAE). If the template is present, it is called, otherwise we fall back to calling load() and store() methods. Change-Id: I42dbbdd622e0ea0db28325acc506e41c472e0f0c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/language/resolvedfilecontext.h')
-rw-r--r--src/lib/corelib/language/resolvedfilecontext.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/corelib/language/resolvedfilecontext.h b/src/lib/corelib/language/resolvedfilecontext.h
index 41b708676..81a3f7472 100644
--- a/src/lib/corelib/language/resolvedfilecontext.h
+++ b/src/lib/corelib/language/resolvedfilecontext.h
@@ -60,17 +60,13 @@ public:
return ResolvedFileContextPtr(new ResolvedFileContext(baseContext));
}
- void load(PersistentPool &pool);
- void store(PersistentPool &pool);
-
-private:
- ResolvedFileContext() {}
- ResolvedFileContext(const FileContextBase &ctx);
-
- template<PersistentPool::OpType opType> void serializationOp(PersistentPool &pool)
+ template<PersistentPool::OpType opType> void completeSerializationOp(PersistentPool &pool)
{
pool.serializationOp<opType>(m_filePath, m_jsExtensions, m_searchPaths, m_jsImports);
}
+private:
+ ResolvedFileContext() {}
+ ResolvedFileContext(const FileContextBase &ctx);
};
bool operator==(const ResolvedFileContext &a, const ResolvedFileContext &b);