diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-14 16:36:32 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-30 09:08:49 +0000 |
commit | 7d8e29534d2bf86cdad8a7a7c4c8b84c60daa42c (patch) | |
tree | b70aaf67905d8e562519006dee1bc23f6e1bddce /src/qml/qml | |
parent | 6a00b4d4ead8efa75c312acaff897d96fe79a6d9 (diff) |
Extract minimal interface from QQmlDebugServer and use it.
This will allow us to move QQmlDebugServer into a plugin. The new QQmlDebugServer
is the interface exposed to connection plugins. The interface exposed to services
is renamed to QQmlDebugConnector, as technically it doesn't have to be a
"server".
Change-Id: Id508b8c0a6960228e889f45a437b73060392db39
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 8 | ||||
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index 3d263590e8..e0cd594ba2 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -44,7 +44,7 @@ #include "qqmlglobal_p.h" #include <private/qqmlprofiler_p.h> #include <private/qv4debugservice_p.h> -#include <private/qqmldebugserver_p.h> +#include <private/qqmldebugconnector_p.h> #include <private/qqmlcompiler_p.h> #include "qqmlinfo.h" @@ -320,7 +320,7 @@ void QQmlBoundSignal_callback(QQmlNotifierEndpoint *e, void **a) if (!s->m_expression) return; - if (QQmlDebugServer::instance()) + if (QQmlDebugConnector::instance()) QV4DebugService::instance()->signalEmitted(QString::fromLatin1(QMetaObjectPrivate::signal(s->m_expression->target()->metaObject(), s->signalIndex()).methodSignature())); QQmlEngine *engine; diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index ea9e257824..34015c17da 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -54,7 +54,7 @@ #include "qqmllist_p.h" #include "qqmltypenamecache_p.h" #include "qqmlnotifier_p.h" -#include <private/qqmldebugserver_p.h> +#include <private/qqmldebugconnector_p.h> #include <private/qqmlprofilerservice_p.h> #include <private/qv4debugservice_p.h> #include <private/qdebugmessageservice_p.h> @@ -861,14 +861,14 @@ void QQmlEnginePrivate::init() rootContext = new QQmlContext(q,true); - if (QCoreApplication::instance()->thread() == q->thread() && QQmlDebugServer::instance()) { + if (QCoreApplication::instance()->thread() == q->thread() && QQmlDebugConnector::instance()) { isDebugging = true; QQmlEngineDebugService::instance(); QV4DebugService::instance(); QQmlProfilerService::instance(); QDebugMessageService::instance(); QQmlEngineControlService::instance(); - QQmlDebugServer::instance()->addEngine(q); + QQmlDebugConnector::instance()->addEngine(q); } } @@ -946,7 +946,7 @@ QQmlEngine::~QQmlEngine() { Q_D(QQmlEngine); if (d->isDebugging) - QQmlDebugServer::instance()->removeEngine(this); + QQmlDebugConnector::instance()->removeEngine(this); d->typeLoader.invalidate(); diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 26dd104753..f2918bb232 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -42,7 +42,7 @@ #include <QFileInfo> #include <private/qqmlprofilerservice_p.h> -#include <private/qqmldebugserver_p.h> +#include <private/qqmldebugconnector_p.h> #include <private/qqmlglobal_p.h> #include <private/qqmlplatform_p.h> @@ -1448,7 +1448,7 @@ QV4::ReturnedValue ConsoleObject::method_profile(CallContext *ctx) const QByteArray baSource = frame.source.toUtf8(); const QByteArray baFunction = frame.function.toUtf8(); QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData()); - if (!QQmlDebugServer::instance()) { + if (!QQmlDebugConnector::instance()) { logger.warning("Cannot start profiling because debug service is disabled. Start with -qmljsdebugger=port:XXXXX."); } else { QQmlProfilerService::instance()->startProfiling(v4->qmlEngine()); @@ -1467,7 +1467,7 @@ QV4::ReturnedValue ConsoleObject::method_profileEnd(CallContext *ctx) const QByteArray baFunction = frame.function.toUtf8(); QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData()); - if (!QQmlDebugServer::instance()) { + if (!QQmlDebugConnector::instance()) { logger.warning("Ignoring console.profileEnd(): the debug service is disabled."); } else { QQmlProfilerService::instance()->stopProfiling(v4->qmlEngine()); |