diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-14 15:32:33 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-04 13:34:29 +0000 |
commit | e115fca4af33bee94c5d524e5d7776b1fa6a31a7 (patch) | |
tree | 016fb9d57e1137957272db71f978e201440c7318 /src/quick/qtquick2.cpp | |
parent | 2c0ed9491e55bdc96bc2deb5ec3c40df6e3271f6 (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/quick/qtquick2.cpp')
-rw-r--r-- | src/quick/qtquick2.cpp | 14 |
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() |