aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmltooling/qmldbg_profiler
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-08-05 17:26:42 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-09-15 08:26:50 +0000
commit3baff0304e5936d2a6ef8288b14758a914bacdc4 (patch)
tree7b7c0696b835b887eb1a3f40d3813ca4918aac52 /src/plugins/qmltooling/qmldbg_profiler
parent483d5256c0a06e52430364d033db1f305bf167f8 (diff)
Make keys of all debug services public
Change-Id: I4af1c351b92f35c11559f68fe9ab60063a665724 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmltooling/qmldbg_profiler')
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp20
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h10
-rw-r--r--src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp4
3 files changed, 16 insertions, 18 deletions
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp
index 4f131ac481..8f697f1571 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp
@@ -36,14 +36,12 @@
QT_BEGIN_NAMESPACE
-const QString QQmlEngineControlService::s_key = QStringLiteral("EngineControl");
-
-QQmlEngineControlService::QQmlEngineControlService(QObject *parent) :
- QQmlDebugService(s_key, 1, parent)
+QQmlEngineControlServiceImpl::QQmlEngineControlServiceImpl(QObject *parent) :
+ QQmlEngineControlService(1, parent)
{
}
-void QQmlEngineControlService::messageReceived(const QByteArray &message)
+void QQmlEngineControlServiceImpl::messageReceived(const QByteArray &message)
{
QMutexLocker lock(&dataMutex);
QQmlDebugStream d(message);
@@ -60,7 +58,7 @@ void QQmlEngineControlService::messageReceived(const QByteArray &message)
}
}
-void QQmlEngineControlService::engineAboutToBeAdded(QQmlEngine *engine)
+void QQmlEngineControlServiceImpl::engineAboutToBeAdded(QQmlEngine *engine)
{
QMutexLocker lock(&dataMutex);
if (state() == Enabled) {
@@ -73,7 +71,7 @@ void QQmlEngineControlService::engineAboutToBeAdded(QQmlEngine *engine)
}
}
-void QQmlEngineControlService::engineAboutToBeRemoved(QQmlEngine *engine)
+void QQmlEngineControlServiceImpl::engineAboutToBeRemoved(QQmlEngine *engine)
{
QMutexLocker lock(&dataMutex);
if (state() == Enabled) {
@@ -86,7 +84,7 @@ void QQmlEngineControlService::engineAboutToBeRemoved(QQmlEngine *engine)
}
}
-void QQmlEngineControlService::engineAdded(QQmlEngine *engine)
+void QQmlEngineControlServiceImpl::engineAdded(QQmlEngine *engine)
{
if (state() == Enabled) {
QMutexLocker lock(&dataMutex);
@@ -96,7 +94,7 @@ void QQmlEngineControlService::engineAdded(QQmlEngine *engine)
}
}
-void QQmlEngineControlService::engineRemoved(QQmlEngine *engine)
+void QQmlEngineControlServiceImpl::engineRemoved(QQmlEngine *engine)
{
if (state() == Enabled) {
QMutexLocker lock(&dataMutex);
@@ -106,7 +104,7 @@ void QQmlEngineControlService::engineRemoved(QQmlEngine *engine)
}
}
-void QQmlEngineControlService::sendMessage(QQmlEngineControlService::MessageType type, QQmlEngine *engine)
+void QQmlEngineControlServiceImpl::sendMessage(QQmlEngineControlServiceImpl::MessageType type, QQmlEngine *engine)
{
QByteArray message;
QQmlDebugStream d(&message, QIODevice::WriteOnly);
@@ -114,7 +112,7 @@ void QQmlEngineControlService::sendMessage(QQmlEngineControlService::MessageType
emit messageToClient(name(), message);
}
-void QQmlEngineControlService::stateChanged(State)
+void QQmlEngineControlServiceImpl::stateChanged(State)
{
// We flush everything for any kind of state change, to avoid complicated timing issues.
QMutexLocker lock(&dataMutex);
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
index e2a93e562a..8dbc922a6f 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.h
@@ -35,7 +35,7 @@
#define QQMLENGINECONTROLSERVICE_H
#include <QMutex>
-#include <private/qqmldebugservice_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
//
// W A R N I N G
@@ -50,11 +50,9 @@
QT_BEGIN_NAMESPACE
-class QQmlEngineControlService : public QQmlDebugService
+class QQmlEngineControlServiceImpl : public QQmlEngineControlService
{
public:
- static const QString s_key;
-
enum MessageType {
EngineAboutToBeAdded,
EngineAdded,
@@ -67,9 +65,11 @@ public:
StopWaitingEngine
};
- QQmlEngineControlService(QObject *parent = 0);
+ QQmlEngineControlServiceImpl(QObject *parent = 0);
protected:
+ friend class QQmlProfilerServiceFactory;
+
QMutex dataMutex;
QList<QQmlEngine *> startingEngines;
QList<QQmlEngine *> stoppingEngines;
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp
index 83c2075246..c1b8e6a817 100644
--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp
+++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservicefactory.cpp
@@ -42,8 +42,8 @@ QQmlDebugService *QQmlProfilerServiceFactory::create(const QString &key)
if (key == QQmlProfilerServiceImpl::s_key)
return new QQmlProfilerServiceImpl(this);
- if (key == QQmlEngineControlService::s_key)
- return new QQmlEngineControlService(this);
+ if (key == QQmlEngineControlServiceImpl::s_key)
+ return new QQmlEngineControlServiceImpl(this);
return 0;
}