diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-29 12:28:10 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-30 09:08:55 +0000 |
commit | 38b14d6646957b2ac4f1d0248a4d0390adb270ab (patch) | |
tree | 9232c4ff5f6babf62b0c25bb769f338ff46662fd /src/qml/qml/qqmlengine.cpp | |
parent | 7d8e29534d2bf86cdad8a7a7c4c8b84c60daa42c (diff) |
Move debugger initialization out of QQmlDebugServer and QQmlEngine
QQmlDebugConnector has to check the parameters before deciding if (and
what kind of) instance to create. It also has to add the services
itself as we don't want to tie a specific implementation of
QQmlDebugConnector to a specific set of services. Logic to load the
services from plugins will be added in a separate change. Integrating
the service initialization with the connector initialization enables us
to load the services before the server thread startsi, which will
simplify the thread synchronization.
QQmlConfigurableDebugService has to recheck for blockingMode once it
gets enabled as it cannot rely on being enabled right away anymore. It
should have done that already before as it's possible to disable and
re-enable services.
Change-Id: I9d161d78836bae10d688a90b4c2a32efed320412
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 34015c17da..1ed102f0c9 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -42,7 +42,6 @@ #include "qqmlexpression.h" #include "qqmlcomponent.h" #include "qqmlvme_p.h" -#include <private/qqmlenginedebugservice_p.h> #include "qqmlstringconverters_p.h" #include "qqmlxmlhttprequest_p.h" #include "qqmlscriptstring.h" @@ -55,10 +54,6 @@ #include "qqmltypenamecache_p.h" #include "qqmlnotifier_p.h" #include <private/qqmldebugconnector_p.h> -#include <private/qqmlprofilerservice_p.h> -#include <private/qv4debugservice_p.h> -#include <private/qdebugmessageservice_p.h> -#include <private/qqmlenginecontrolservice_p.h> #include "qqmlincubator.h" #include "qqmlabstracturlinterceptor.h" #include <private/qqmlboundsignal_p.h> @@ -863,11 +858,7 @@ void QQmlEnginePrivate::init() if (QCoreApplication::instance()->thread() == q->thread() && QQmlDebugConnector::instance()) { isDebugging = true; - QQmlEngineDebugService::instance(); - QV4DebugService::instance(); - QQmlProfilerService::instance(); - QDebugMessageService::instance(); - QQmlEngineControlService::instance(); + QQmlDebugConnector::instance()->open(); QQmlDebugConnector::instance()->addEngine(q); } } @@ -1487,19 +1478,6 @@ Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *o #endif // QT_DEPRECATED_SINCE(5, 1) -QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool printWarning) -{ -#ifndef QQML_NO_DEBUG_PROTOCOL - if (!QQmlEnginePrivate::qml_debugging_enabled - && printWarning) { - qDebug("QML debugging is enabled. Only use this in a safe environment."); - } - QQmlEnginePrivate::qml_debugging_enabled = true; -#else - Q_UNUSED(printWarning); -#endif -} - class QQmlDataExtended { public: QQmlDataExtended(); |