forked from qt-creator/qt-creator
QmlJS: Enforce Context always being linked.
The default way of creating a Context is through Link. Change-Id: Ia81f7ce90ba2b33d02eed432a61be836d404bedd Reviewed-on: http://codereview.qt.nokia.com/1041 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -319,7 +319,10 @@ private:
|
||||
class QMLJS_EXPORT Context
|
||||
{
|
||||
public:
|
||||
Context(const Snapshot &snapshot);
|
||||
typedef QHash<const Document *, QSharedPointer<const Imports> > ImportsPerDocument;
|
||||
|
||||
// Context takes ownership of valueOwner
|
||||
Context(const Snapshot &snapshot, ValueOwner *valueOwner, const ImportsPerDocument &imports);
|
||||
~Context();
|
||||
|
||||
ValueOwner *valueOwner() const;
|
||||
@@ -329,7 +332,6 @@ public:
|
||||
ScopeChain &scopeChain();
|
||||
|
||||
const Imports *imports(const Document *doc) const;
|
||||
void setImports(const Document *doc, const Imports *imports);
|
||||
|
||||
const Value *lookup(const QString &name, const ObjectValue **foundInScope = 0) const;
|
||||
const ObjectValue *lookupType(const Document *doc, AST::UiQualifiedId *qmlTypeName,
|
||||
@@ -344,7 +346,7 @@ private:
|
||||
|
||||
Snapshot _snapshot;
|
||||
QSharedPointer<ValueOwner> _valueOwner;
|
||||
QHash<const Document *, QSharedPointer<const Imports> > _imports;
|
||||
ImportsPerDocument _imports;
|
||||
ScopeChain _scopeChain;
|
||||
int _qmlScopeObjectIndex;
|
||||
bool _qmlScopeObjectSet;
|
||||
|
Reference in New Issue
Block a user