summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcontext.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-13 05:21:42 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-13 05:21:42 (GMT)
commit29dd542d079d1b2bac37357d8ea18e5622cc12dc (patch)
treed4525cd54f5faf900374904d37d6e5fc1cbacd08 /src/declarative/qml/qmlcontext.cpp
parentd5e372425698c6a87e86743114e4b8d28d5d86eb (diff)
downloadQt-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.cpp33
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