aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-02-05 15:38:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-05 18:42:36 +0100
commit9ca736fd3f77aff2bbc61f6deabe2dc44f6e1bfd (patch)
tree4d390f847807d62a41cb85a1209b85f7651d4cb0 /src/qml/qml/qqmlengine.cpp
parent843202b6083f2b9d01391558b7e6e3e0d014cca6 (diff)
Unify the interface for QQmlDebugServices
Let the debug server handle adding and removing of engines through defined interfaces to prepare for multi-engine profiling and debugging. Change-Id: I7b277e54bdcce1d3e95e723f041a7db6b08b29fc Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 0766fcb7b1..0529e41007 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -62,6 +62,7 @@
#include "qqmllist_p.h"
#include "qqmltypenamecache_p.h"
#include "qqmlnotifier_p.h"
+#include <private/qqmldebugserver_p.h>
#include <private/qqmlprofilerservice_p.h>
#include <private/qv4debugservice_p.h>
#include <private/qdebugmessageservice_p.h>
@@ -813,11 +814,12 @@ void QQmlEnginePrivate::init()
if (QCoreApplication::instance()->thread() == q->thread() &&
QQmlEngineDebugService::isDebuggingEnabled()) {
isDebugging = true;
- QQmlEngineDebugService::instance()->addEngine(q);
- QV4DebugService::instance()->addEngine(q);
- QV4ProfilerService::initialize();
+ QQmlEngineDebugService::instance();
+ QV4DebugService::instance();
+ QV4ProfilerService::instance();
QQmlProfilerService::instance();
QDebugMessageService::instance();
+ QQmlDebugServer::instance()->addEngine(q);
}
}
@@ -895,10 +897,8 @@ QQmlEngine::QQmlEngine(QQmlEnginePrivate &dd, QObject *parent)
QQmlEngine::~QQmlEngine()
{
Q_D(QQmlEngine);
- if (d->isDebugging) {
- QQmlEngineDebugService::instance()->remEngine(this);
- QV4DebugService::instance()->removeEngine(this);
- }
+ if (d->isDebugging)
+ QQmlDebugServer::instance()->removeEngine(this);
// Emit onDestruction signals for the root context before
// we destroy the contexts, engine, Singleton Types etc. that