aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-07-14 15:32:33 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-08-04 13:34:29 +0000
commite115fca4af33bee94c5d524e5d7776b1fa6a31a7 (patch)
tree016fb9d57e1137957272db71f978e201440c7318 /src/qml/qml/qqmlengine.cpp
parent2c0ed9491e55bdc96bc2deb5ec3c40df6e3271f6 (diff)
Retrieve services from debug connector, not via static instance()
This will allow us to remove the instance() methods and create the services from factories in plugins. Also, it allows us to remove the isDebugging member from QQmlEnginePrivate. Change-Id: Id9d9820a910902ecfdb1e8175e215093ce3d0965 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 1ed102f0c9..df5f50644c 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -580,7 +580,7 @@ the same object as is returned from the Qt.include() call.
// Qt.include() is implemented in qv4include.cpp
QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e)
-: propertyCapture(0), rootContext(0), isDebugging(false),
+: propertyCapture(0), rootContext(0),
profiler(0), outputWarningsToMsgLog(true),
cleanup(0), erroredBindings(0), inProgressCreations(0),
workerScriptEngine(0),
@@ -857,7 +857,6 @@ void QQmlEnginePrivate::init()
rootContext = new QQmlContext(q,true);
if (QCoreApplication::instance()->thread() == q->thread() && QQmlDebugConnector::instance()) {
- isDebugging = true;
QQmlDebugConnector::instance()->open();
QQmlDebugConnector::instance()->addEngine(q);
}
@@ -936,8 +935,9 @@ QQmlEngine::QQmlEngine(QQmlEnginePrivate &dd, QObject *parent)
QQmlEngine::~QQmlEngine()
{
Q_D(QQmlEngine);
- if (d->isDebugging)
- QQmlDebugConnector::instance()->removeEngine(this);
+ QQmlDebugConnector *server = QQmlDebugConnector::instance();
+ if (server)
+ server->removeEngine(this);
d->typeLoader.invalidate();