forked from qt-creator/qt-creator
Make QmlJS::Link private. Use Context::build to set up a context.
This commit is contained in:
@@ -2,34 +2,32 @@
|
||||
#define QMLJSLINK_H
|
||||
|
||||
#include <qmljs/qmljsdocument.h>
|
||||
#include <qmljs/qmljsbind.h>
|
||||
#include <qmljs/qmljsinterpreter.h>
|
||||
#include <qmljs/parser/qmljsastfwd_p.h>
|
||||
#include <qmljs/parser/qmljsengine_p.h>
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QHash>
|
||||
|
||||
namespace QmlJS {
|
||||
|
||||
class NameId;
|
||||
|
||||
/*
|
||||
Temporarily links a set of bound documents together to allow resolving cross-document
|
||||
dependencies. The link is undone when this object is destoyed.
|
||||
Helper for building a context.
|
||||
*/
|
||||
class QMLJS_EXPORT Link
|
||||
class Link
|
||||
{
|
||||
public:
|
||||
// Link all documents in snapshot reachable from doc.
|
||||
Link(Document::Ptr doc, const Snapshot &snapshot, Interpreter::Engine *interp);
|
||||
Link(Interpreter::Context *context, Document::Ptr doc, const Snapshot &snapshot);
|
||||
~Link();
|
||||
|
||||
Interpreter::Context *context();
|
||||
Interpreter::Engine *engine();
|
||||
|
||||
// Get the scope chain for the currentObject inside doc.
|
||||
void scopeChainAt(Document::Ptr doc, AST::Node *currentObject);
|
||||
|
||||
private:
|
||||
Interpreter::Engine *engine();
|
||||
|
||||
static QList<Document::Ptr> reachableDocuments(Document::Ptr startDoc, const Snapshot &snapshot);
|
||||
static AST::UiQualifiedId *qualifiedTypeNameId(AST::Node *node);
|
||||
|
||||
@@ -44,7 +42,7 @@ private:
|
||||
|
||||
private:
|
||||
Snapshot _snapshot;
|
||||
Interpreter::Context _context;
|
||||
Interpreter::Context *_context;
|
||||
QList<Document::Ptr> _docs;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user