diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-13 05:21:42 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-13 05:21:42 (GMT) |
commit | 29dd542d079d1b2bac37357d8ea18e5622cc12dc (patch) | |
tree | d4525cd54f5faf900374904d37d6e5fc1cbacd08 /src/declarative/qml/qmlcontext.cpp | |
parent | d5e372425698c6a87e86743114e4b8d28d5d86eb (diff) | |
download | Qt-29dd542d079d1b2bac37357d8ea18e5622cc12dc.zip Qt-29dd542d079d1b2bac37357d8ea18e5622cc12dc.tar.gz Qt-29dd542d079d1b2bac37357d8ea18e5622cc12dc.tar.bz2 |
Start moving debugger out of process
Diffstat (limited to 'src/declarative/qml/qmlcontext.cpp')
-rw-r--r-- | src/declarative/qml/qmlcontext.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index b590596..0b2742d 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -54,8 +54,8 @@ QT_BEGIN_NAMESPACE QmlContextPrivate::QmlContextPrivate() -: parent(0), engine(0), notifyIndex(-1), highPriorityCount(0), - startLine(-1), endLine(-1) +: parent(0), engine(0), isInternal(false), notifyIndex(-1), + highPriorityCount(0), startLine(-1), endLine(-1) { } @@ -212,7 +212,7 @@ void QmlContextPrivate::addDefaultObject(QObject *object, Priority priority) */ /*! \internal */ -QmlContext::QmlContext(QmlEngine *e) +QmlContext::QmlContext(QmlEngine *e, bool) : QObject(*(new QmlContextPrivate)) { Q_D(QmlContext); @@ -221,6 +221,20 @@ QmlContext::QmlContext(QmlEngine *e) } /*! + Create a new QmlContext as a child of \a engine's root context, and the + QObject \a parent. +*/ +QmlContext::QmlContext(QmlEngine *engine, QObject *parent) +: QObject(*(new QmlContextPrivate), parent) +{ + Q_D(QmlContext); + QmlContext *parentContext = engine?engine->rootContext():0; + d->parent = parentContext; + d->engine = parentContext->engine(); + d->init(); +} + +/*! Create a new QmlContext with the given \a parentContext, and the QObject \a parent. */ @@ -234,6 +248,19 @@ QmlContext::QmlContext(QmlContext *parentContext, QObject *parent) } /*! + \internal +*/ +QmlContext::QmlContext(QmlContext *parentContext, QObject *parent, bool) +: QObject(*(new QmlContextPrivate), parent) +{ + Q_D(QmlContext); + d->parent = parentContext; + d->engine = parentContext->engine(); + d->isInternal = true; + d->init(); +} + +/*! Destroys the QmlContext. Any expressions, or sub-contexts dependent on this context will be |