forked from qt-creator/qt-creator
Bind each QML document after parsing. Link them before use.
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "qmljsdocument.h"
|
||||
#include "qmljsbind.h"
|
||||
#include <qmljs/parser/qmljsast_p.h>
|
||||
#include <qmljs/parser/qmljslexer_p.h>
|
||||
#include <qmljs/parser/qmljsparser_p.h>
|
||||
@@ -143,6 +144,8 @@ bool Document::parseQml()
|
||||
_ast = parser.ast();
|
||||
_diagnosticMessages = parser.diagnosticMessages();
|
||||
|
||||
_bind = BindPtr(new Bind(this));
|
||||
|
||||
return _parsedCorrectly;
|
||||
}
|
||||
|
||||
@@ -164,6 +167,8 @@ bool Document::parseJavaScript()
|
||||
_ast = cast<Program*>(parser.rootNode());
|
||||
_diagnosticMessages = parser.diagnosticMessages();
|
||||
|
||||
_bind = BindPtr(new Bind(this));
|
||||
|
||||
return _parsedCorrectly;
|
||||
}
|
||||
|
||||
@@ -190,6 +195,11 @@ bool Document::parseExpression()
|
||||
return _parsedCorrectly;
|
||||
}
|
||||
|
||||
BindPtr Document::bind() const
|
||||
{
|
||||
return _bind;
|
||||
}
|
||||
|
||||
Snapshot::Snapshot()
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user