aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/qtquick2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/qtquick2.cpp')
-rw-r--r--src/quick/qtquick2.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/quick/qtquick2.cpp b/src/quick/qtquick2.cpp
index acf7c3e3fe..ecf6865895 100644
--- a/src/quick/qtquick2.cpp
+++ b/src/quick/qtquick2.cpp
@@ -38,8 +38,8 @@
#include <private/qquickitemsmodule_p.h>
#include <private/qquickaccessiblefactory_p.h>
-#include <private/qqmlenginedebugservice_p.h>
#include <private/qqmldebugconnector_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmldebugstatesdelegate_p.h>
#include <private/qqmlbinding_p.h>
#include <private/qqmlcontext_p.h>
@@ -187,11 +187,13 @@ void QQmlQtQuick2Module::defineModule()
QAccessible::installFactory(&qQuickAccessibleFactory);
#endif
- if (QQmlDebugConnector::instance()) {
- QQmlEngineDebugServiceImpl::instance()->setStatesDelegate(
- new QQmlQtQuick2DebugStatesDelegate);
- QQuickProfiler::initialize();
- }
+ QQmlEngineDebugService *debugService = QQmlDebugConnector::service<QQmlEngineDebugService>();
+ if (debugService)
+ debugService->setStatesDelegate(new QQmlQtQuick2DebugStatesDelegate);
+
+ QQmlProfilerService *profilerService = QQmlDebugConnector::service<QQmlProfilerService>();
+ if (profilerService)
+ QQuickProfiler::initialize(profilerService);
}
void QQmlQtQuick2Module::undefineModule()