diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-14 14:45:50 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-04 13:34:26 +0000 |
commit | 2c0ed9491e55bdc96bc2deb5ec3c40df6e3271f6 (patch) | |
tree | 029e73dddfb3202acbc2ce862fb68b8ff85146ae /src/qml/debugger/qqmlinspectorservice.cpp | |
parent | 4e6de08ba154e541587b2939137a3da1081750be (diff) |
Extract minimal abstract interfaces from debug services.
We will access the services' functionality through those interfaces
once they live in their own plugins.
Change-Id: I0a0d7e73c07cb874b3b507cc4a9d304588c87bca
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/debugger/qqmlinspectorservice.cpp')
-rw-r--r-- | src/qml/debugger/qqmlinspectorservice.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/qml/debugger/qqmlinspectorservice.cpp b/src/qml/debugger/qqmlinspectorservice.cpp index c6ee8e4d52..f3ff13a8c0 100644 --- a/src/qml/debugger/qqmlinspectorservice.cpp +++ b/src/qml/debugger/qqmlinspectorservice.cpp @@ -48,37 +48,36 @@ DEFINE_BOOL_CONFIG_OPTION(qmlDebugVerbose, QML_DEBUGGER_VERBOSE) QT_BEGIN_NAMESPACE -Q_GLOBAL_STATIC(QQmlInspectorService, serviceInstance) +Q_GLOBAL_STATIC(QQmlInspectorServiceImpl, serviceInstance) -QQmlInspectorService::QQmlInspectorService() - : QQmlDebugService(QStringLiteral("QmlInspector"), 1) - , m_currentInspectorPlugin(0) +QQmlInspectorServiceImpl::QQmlInspectorServiceImpl(): QQmlInspectorService(1), + m_currentInspectorPlugin(0) { } -QQmlInspectorService *QQmlInspectorService::instance() +QQmlInspectorServiceImpl *QQmlInspectorServiceImpl::instance() { return serviceInstance(); } -void QQmlInspectorService::addView(QObject *view) +void QQmlInspectorServiceImpl::addView(QObject *view) { m_views.append(view); updateState(); } -void QQmlInspectorService::removeView(QObject *view) +void QQmlInspectorServiceImpl::removeView(QObject *view) { m_views.removeAll(view); updateState(); } -void QQmlInspectorService::stateChanged(State /*state*/) +void QQmlInspectorServiceImpl::stateChanged(State /*state*/) { QMetaObject::invokeMethod(this, "updateState", Qt::QueuedConnection); } -void QQmlInspectorService::updateState() +void QQmlInspectorServiceImpl::updateState() { if (m_views.isEmpty()) { if (m_currentInspectorPlugin) { @@ -118,18 +117,18 @@ void QQmlInspectorService::updateState() } } -void QQmlInspectorService::messageReceived(const QByteArray &message) +void QQmlInspectorServiceImpl::messageReceived(const QByteArray &message) { QMetaObject::invokeMethod(this, "processMessage", Qt::QueuedConnection, Q_ARG(QByteArray, message)); } -void QQmlInspectorService::processMessage(const QByteArray &message) +void QQmlInspectorServiceImpl::processMessage(const QByteArray &message) { if (m_currentInspectorPlugin) m_currentInspectorPlugin->clientMessage(message); } -void QQmlInspectorService::loadInspectorPlugins() +void QQmlInspectorServiceImpl::loadInspectorPlugins() { #ifndef QT_NO_LIBRARY QStringList pluginCandidates; |