forked from qt-creator/qt-creator
QmlJS: Find setContextProperty calls in C++ and expose to QML.
Task-number: QTCREATORBUG-3199 Change-Id: I591490ceafadc0f5a07c63ec063f1bdfa7055f47 Reviewed-on: http://codereview.qt-project.org/4074 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -256,7 +256,8 @@ Document::Document(const QString &fileName)
|
||||
: _fileName(QDir::cleanPath(fileName)),
|
||||
_globalNamespace(0),
|
||||
_revision(0),
|
||||
_editorRevision(0)
|
||||
_editorRevision(0),
|
||||
_checkMode(0)
|
||||
{
|
||||
_control = new Control();
|
||||
|
||||
@@ -569,6 +570,8 @@ void Document::check(CheckMode mode)
|
||||
{
|
||||
Q_ASSERT(!_globalNamespace);
|
||||
|
||||
_checkMode = mode;
|
||||
|
||||
if (! isParsed())
|
||||
parse();
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ public:
|
||||
bool parse(ParseMode mode = ParseTranlationUnit);
|
||||
|
||||
enum CheckMode {
|
||||
Unchecked,
|
||||
FullCheck,
|
||||
FastCheck
|
||||
};
|
||||
@@ -322,6 +323,9 @@ public:
|
||||
void keepSourceAndAST();
|
||||
void releaseSourceAndAST();
|
||||
|
||||
CheckMode checkMode() const
|
||||
{ return static_cast<CheckMode>(_checkMode); }
|
||||
|
||||
private:
|
||||
QString _fileName;
|
||||
Control *_control;
|
||||
@@ -338,6 +342,7 @@ private:
|
||||
QAtomicInt _keepSourceAndASTCount;
|
||||
unsigned _revision;
|
||||
unsigned _editorRevision;
|
||||
quint8 _checkMode;
|
||||
|
||||
friend class Snapshot;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user