qmljs: new import/dep tracking

Change-Id: I9f4de2a06aad3afb80372a4b80e56db658683575
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Fawzi Mohamed
2013-10-16 15:08:27 +02:00
parent 5bf3ed7c6a
commit e1b44e870f
24 changed files with 1327 additions and 32 deletions

View File

@@ -32,6 +32,7 @@
#include "qmljs_global.h"
#include "qmljsvalueowner.h"
#include "qmljsviewercontext.h"
#include <QSharedPointer>
@@ -50,7 +51,8 @@ public:
typedef QHash<const Document *, QSharedPointer<const Imports> > ImportsPerDocument;
// Context takes ownership of valueOwner
static ContextPtr create(const Snapshot &snapshot, ValueOwner *valueOwner, const ImportsPerDocument &imports);
static ContextPtr create(const Snapshot &snapshot, ValueOwner *valueOwner,
const ImportsPerDocument &imports, const ViewerContext &vContext);
~Context();
ContextPtr ptr() const;
@@ -69,11 +71,13 @@ public:
private:
// Context takes ownership of valueOwner
Context(const Snapshot &snapshot, ValueOwner *valueOwner, const ImportsPerDocument &imports);
Context(const Snapshot &snapshot, ValueOwner *valueOwner, const ImportsPerDocument &imports,
const ViewerContext &vContext);
Snapshot _snapshot;
QSharedPointer<ValueOwner> _valueOwner;
ImportsPerDocument _imports;
ViewerContext _vContext;
QWeakPointer<const Context> _ptr;
};