diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-02-27 17:35:52 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-02-28 12:42:44 +0100 |
commit | 85b234c3a0a4d1c40dd509f8a1a24907eea7d2ba (patch) | |
tree | f547648f13239d9fea0eccfe12fd840a55dde0d3 /src/lib/corelib/language/resolvedfilecontext.cpp | |
parent | 08a4a71c7ced7b799e4b706377a39a5146431c38 (diff) |
give FileContext and ResolvedFileContext a common base
Change-Id: I76f0e5e0b9f99a6f33c3381436ee6c4879e36a68
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/corelib/language/resolvedfilecontext.cpp')
-rw-r--r-- | src/lib/corelib/language/resolvedfilecontext.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/lib/corelib/language/resolvedfilecontext.cpp b/src/lib/corelib/language/resolvedfilecontext.cpp index 0ac48e69b..bf36b4e79 100644 --- a/src/lib/corelib/language/resolvedfilecontext.cpp +++ b/src/lib/corelib/language/resolvedfilecontext.cpp @@ -50,18 +50,23 @@ static inline QDataStream& operator<<(QDataStream &stream, const JsImport &jsImp << jsImport.location; } +ResolvedFileContext::ResolvedFileContext(const FileContextBase &ctx) + : FileContextBase(ctx) +{ +} + void ResolvedFileContext::load(PersistentPool &pool) { - filePath = pool.idLoadString(); - jsExtensions = pool.idLoadStringList(); - pool.stream() >> jsImports; + m_filePath = pool.idLoadString(); + m_jsExtensions = pool.idLoadStringList(); + pool.stream() >> m_jsImports; } void ResolvedFileContext::store(PersistentPool &pool) const { - pool.storeString(filePath); - pool.storeStringList(jsExtensions); - pool.stream() << jsImports; + pool.storeString(m_filePath); + pool.storeStringList(m_jsExtensions); + pool.stream() << m_jsImports; } bool operator==(const ResolvedFileContext &a, const ResolvedFileContext &b) @@ -70,9 +75,9 @@ bool operator==(const ResolvedFileContext &a, const ResolvedFileContext &b) return true; if (!!&a != !!&b) return false; - return a.filePath == b.filePath - && a.jsExtensions == b.jsExtensions - && a.jsImports == b.jsImports; + return a.filePath() == b.filePath() + && a.jsExtensions() == b.jsExtensions() + && a.jsImports() == b.jsImports(); } } // namespace Internal |