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:
Christian Kamm
2011-08-25 12:35:55 +02:00
parent c2f31f16dc
commit 10a956a8f7
8 changed files with 327 additions and 71 deletions

View File

@@ -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();

View File

@@ -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;
};