Extract minimal abstract interfaces from debug services.
authorUlf Hermann <ulf.hermann@theqtcompany.com>
Tue, 14 Jul 2015 12:45:50 +0000 (14:45 +0200)
committerUlf Hermann <ulf.hermann@theqtcompany.com>
Tue, 4 Aug 2015 13:34:26 +0000 (13:34 +0000)
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>
22 files changed:
src/plugins/qmltooling/shared/abstractviewinspector.cpp
src/plugins/qmltooling/shared/abstractviewinspector.h
src/qml/debugger/debugger.pri
src/qml/debugger/qqmlconfigurabledebugservice_p.h
src/qml/debugger/qqmldebugconnector.cpp
src/qml/debugger/qqmldebugserviceinterfaces.cpp [new file with mode: 0644]
src/qml/debugger/qqmldebugserviceinterfaces_p.h [new file with mode: 0644]
src/qml/debugger/qqmlenginedebugservice.cpp
src/qml/debugger/qqmlenginedebugservice_p.h
src/qml/debugger/qqmlinspectorservice.cpp
src/qml/debugger/qqmlinspectorservice_p.h
src/qml/debugger/qqmlprofilerservice.cpp
src/qml/debugger/qqmlprofilerservice_p.h
src/qml/debugger/qv4debugservice.cpp
src/qml/debugger/qv4debugservice_p.h
src/qml/qml/qqmlboundsignal.cpp
src/qml/qml/qqmlcomponent.cpp
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
src/quick/items/qquickview.cpp
src/quick/qtquick2.cpp
src/quick/util/qquickprofiler.cpp
src/quickwidgets/qquickwidget.cpp

index 10957d2..6184b4c 100644 (file)
@@ -83,7 +83,7 @@ namespace QmlJSDebugger {
 AbstractViewInspector::AbstractViewInspector(QObject *parent) :
     QObject(parent),
     m_enabled(false),
-    m_debugService(QQmlInspectorService::instance()),
+    m_debugService(QQmlInspectorServiceImpl::instance()),
     m_eventId(0),
     m_reloadEventId(-1)
 {
index 8958e94..342e635 100644 (file)
@@ -40,7 +40,7 @@
 
 QT_BEGIN_NAMESPACE
 class QQmlEngine;
-class QQmlInspectorService;
+class QQmlDebugService;
 class QKeyEvent;
 class QMouseEvent;
 class QWheelEvent;
@@ -111,7 +111,7 @@ private:
 
     bool m_enabled;
 
-    QQmlInspectorService *m_debugService;
+    QQmlDebugService *m_debugService;
     QList<AbstractTool *> m_tools;
     int m_eventId;
     int m_reloadEventId;
index ec2e52e..9f9e78a 100644 (file)
@@ -4,6 +4,7 @@ SOURCES += \
     $$PWD/qqmldebug.cpp \
     $$PWD/qqmldebugconnector.cpp \
     $$PWD/qqmldebugservice.cpp \
+    $$PWD/qqmldebugserviceinterfaces.cpp \
     $$PWD/qqmlprofilerservice.cpp \
     $$PWD/qqmldebugserver.cpp \
     $$PWD/qqmlinspectorservice.cpp \
@@ -22,6 +23,7 @@ HEADERS += \
     $$PWD/qqmlprofilerservice_p.h \
     $$PWD/qqmldebugserver_p.h \
     $$PWD/qqmldebugserverconnection_p.h \
+    $$PWD/qqmldebugserviceinterfaces_p.h \
     $$PWD/qqmldebugstatesdelegate_p.h \
     $$PWD/qqmlinspectorservice_p.h \
     $$PWD/qqmlinspectorinterface_p.h \
index 1329591..ce7609f 100644 (file)
@@ -56,8 +56,8 @@ template <class Base>
 class QQmlConfigurableDebugService : public Base
 {
 protected:
-    QQmlConfigurableDebugService(const QString &name, float version, QObject *parent = 0) :
-        Base(name, version, parent), m_configMutex(QMutex::Recursive)
+    QQmlConfigurableDebugService(float version, QObject *parent = 0) :
+        Base(version, parent), m_configMutex(QMutex::Recursive)
     {
         init();
     }
index eb111f7..3157c09 100644 (file)
@@ -105,12 +105,12 @@ QQmlDebugConnector *QQmlDebugConnector::instance()
         }
         params->instance = loadQQmlDebugConnector(QLatin1String("QQmlDebugServer"));
         if (params->instance) {
-            QQmlEngineDebugService::instance();
-            QV4DebugService::instance();
-            QQmlProfilerService::instance();
+            QQmlEngineDebugServiceImpl::instance();
+            QV4DebugServiceImpl::instance();
+            QQmlProfilerServiceImpl::instance();
             QDebugMessageService::instance();
             QQmlEngineControlService::instance();
-            QQmlInspectorService::instance();
+            QQmlInspectorServiceImpl::instance();
         }
     }
 
diff --git a/src/qml/debugger/qqmldebugserviceinterfaces.cpp b/src/qml/debugger/qqmldebugserviceinterfaces.cpp
new file mode 100644 (file)
index 0000000..2bf9f27
--- /dev/null
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qqmldebugserviceinterfaces_p.h"
+
+QT_BEGIN_NAMESPACE
+
+const QString QV4DebugService::s_key = QStringLiteral("V8Debugger");
+const QString QQmlEngineDebugService::s_key = QStringLiteral("QmlDebugger");
+const QString QQmlInspectorService::s_key = QStringLiteral("QmlInspector");
+const QString QQmlProfilerService::s_key = QStringLiteral("CanvasFrameRate");
+
+QT_END_NAMESPACE
diff --git a/src/qml/debugger/qqmldebugserviceinterfaces_p.h b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
new file mode 100644 (file)
index 0000000..3c204bc
--- /dev/null
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQMLDEBUGSERVICEINTERFACES_P_H
+#define QQMLDEBUGSERVICEINTERFACES_P_H
+
+//
+//  W A R N I N G
+//  -------------
+//
+// This file is not part of the Qt API.  It exists purely as an
+// implementation detail.  This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qstring.h>
+#include <private/qtqmlglobal_p.h>
+#include <private/qqmldebugservice_p.h>
+#include <private/qqmldebugstatesdelegate_p.h>
+#include <private/qqmlabstractprofileradapter_p.h>
+#include <private/qqmlboundsignal_p.h>
+
+#include <limits>
+
+QT_BEGIN_NAMESPACE
+
+class Q_QML_PRIVATE_EXPORT QV4DebugService : protected QQmlDebugService
+{
+    Q_OBJECT
+public:
+    virtual void signalEmitted(const QString &signal) = 0;
+
+protected:
+    QV4DebugService(float version, QObject *parent = 0) :
+        QQmlDebugService(s_key, version, parent) {}
+
+    static const QString s_key;
+};
+
+class Q_QML_PRIVATE_EXPORT QQmlProfilerService : protected QQmlDebugService
+{
+    Q_OBJECT
+public:
+    virtual void addGlobalProfiler(QQmlAbstractProfilerAdapter *profiler) = 0;
+    virtual void removeGlobalProfiler(QQmlAbstractProfilerAdapter *profiler) = 0;
+
+    virtual void startProfiling(QQmlEngine *engine,
+                                quint64 features = std::numeric_limits<quint64>::max()) = 0;
+    virtual void stopProfiling(QQmlEngine *engine) = 0;
+
+    virtual void dataReady(QQmlAbstractProfilerAdapter *profiler) = 0;
+
+protected:
+    QQmlProfilerService(float version, QObject *parent = 0) :
+        QQmlDebugService(s_key, version, parent) {}
+
+    static const QString s_key;
+};
+
+class Q_QML_PRIVATE_EXPORT QQmlEngineDebugService : protected QQmlDebugService
+{
+    Q_OBJECT
+public:
+    virtual void objectCreated(QQmlEngine *engine, QObject *object) = 0;
+    virtual void setStatesDelegate(QQmlDebugStatesDelegate *) = 0;
+
+protected:
+    QQmlEngineDebugService(float version, QObject *parent = 0) :
+        QQmlDebugService(s_key, version, parent) {}
+
+    QQmlBoundSignal *nextSignal(QQmlBoundSignal *prev) { return prev->m_nextSignal; }
+
+    static const QString s_key;
+};
+
+class Q_QML_PRIVATE_EXPORT QQmlInspectorService : protected QQmlDebugService
+{
+    Q_OBJECT
+public:
+    virtual void addView(QObject *) = 0;
+    virtual void removeView(QObject *) = 0;
+
+protected:
+    QQmlInspectorService(float version, QObject *parent = 0) :
+        QQmlDebugService(s_key, version, parent) {}
+
+    static const QString s_key;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQMLDEBUGSERVICEINTERFACES_P_H
+
index 1d481d9..30d2f32 100644 (file)
 
 QT_BEGIN_NAMESPACE
 
-Q_GLOBAL_STATIC(QQmlEngineDebugService, qmlEngineDebugService)
+Q_GLOBAL_STATIC(QQmlEngineDebugServiceImpl, qmlEngineDebugService)
 
-QQmlEngineDebugService *QQmlEngineDebugService::instance()
+QQmlEngineDebugServiceImpl *QQmlEngineDebugServiceImpl::instance()
 {
     return qmlEngineDebugService();
 }
 
-QQmlEngineDebugService::QQmlEngineDebugService(QObject *parent)
-    : QQmlDebugService(QStringLiteral("QmlDebugger"), 2, parent),
-      m_watch(new QQmlWatcher(this)),
-      m_statesDelegate(0)
+QQmlEngineDebugServiceImpl::QQmlEngineDebugServiceImpl(QObject *parent) :
+    QQmlEngineDebugService(2, parent), m_watch(new QQmlWatcher(this)), m_statesDelegate(0)
 {
     QObject::connect(m_watch, SIGNAL(propertyChanged(int,int,QMetaProperty,QVariant)),
                      this, SLOT(propertyChanged(int,int,QMetaProperty,QVariant)));
 }
 
-QQmlEngineDebugService::~QQmlEngineDebugService()
+QQmlEngineDebugServiceImpl::~QQmlEngineDebugServiceImpl()
 {
     delete m_statesDelegate;
 }
 
 QDataStream &operator<<(QDataStream &ds,
-                        const QQmlEngineDebugService::QQmlObjectData &data)
+                        const QQmlEngineDebugServiceImpl::QQmlObjectData &data)
 {
     ds << data.url << data.lineNumber << data.columnNumber << data.idString
        << data.objectName << data.objectType << data.objectId << data.contextId
@@ -84,7 +82,7 @@ QDataStream &operator<<(QDataStream &ds,
 }
 
 QDataStream &operator>>(QDataStream &ds,
-                        QQmlEngineDebugService::QQmlObjectData &data)
+                        QQmlEngineDebugServiceImpl::QQmlObjectData &data)
 {
     ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString
        >> data.objectName >> data.objectType >> data.objectId >> data.contextId
@@ -93,7 +91,7 @@ QDataStream &operator>>(QDataStream &ds,
 }
 
 QDataStream &operator<<(QDataStream &ds,
-                        const QQmlEngineDebugService::QQmlObjectProperty &data)
+                        const QQmlEngineDebugServiceImpl::QQmlObjectProperty &data)
 {
     ds << (int)data.type << data.name;
     // check first whether the data can be saved
@@ -109,12 +107,12 @@ QDataStream &operator<<(QDataStream &ds,
 }
 
 QDataStream &operator>>(QDataStream &ds,
-                        QQmlEngineDebugService::QQmlObjectProperty &data)
+                        QQmlEngineDebugServiceImpl::QQmlObjectProperty &data)
 {
     int type;
     ds >> type >> data.name >> data.value >> data.valueTypeName
        >> data.binding >> data.hasNotifySignal;
-    data.type = (QQmlEngineDebugService::QQmlObjectProperty::Type)type;
+    data.type = (QQmlEngineDebugServiceImpl::QQmlObjectProperty::Type)type;
     return ds;
 }
 
@@ -141,8 +139,8 @@ static bool hasValidSignal(QObject *object, const QString &propertyName)
     return true;
 }
 
-QQmlEngineDebugService::QQmlObjectProperty
-QQmlEngineDebugService::propertyData(QObject *obj, int propIdx)
+QQmlEngineDebugServiceImpl::QQmlObjectProperty
+QQmlEngineDebugServiceImpl::propertyData(QObject *obj, int propIdx)
 {
     QQmlObjectProperty rv;
 
@@ -176,7 +174,7 @@ QQmlEngineDebugService::propertyData(QObject *obj, int propIdx)
     return rv;
 }
 
-QVariant QQmlEngineDebugService::valueContents(QVariant value) const
+QVariant QQmlEngineDebugServiceImpl::valueContents(QVariant value) const
 {
     // We can't send JS objects across the wire, so transform them to variant
     // maps for serialization.
@@ -237,7 +235,7 @@ QVariant QQmlEngineDebugService::valueContents(QVariant value) const
     return QString(QStringLiteral("<unknown value>"));
 }
 
-void QQmlEngineDebugService::buildObjectDump(QDataStream &message,
+void QQmlEngineDebugServiceImpl::buildObjectDump(QDataStream &message,
                                                      QObject *object, bool recur, bool dumpProperties)
 {
     message << objectData(object);
@@ -297,7 +295,7 @@ void QQmlEngineDebugService::buildObjectDump(QDataStream &message,
             }
             fakeProperties << prop;
 
-            signalHandler = signalHandler->m_nextSignal;
+            signalHandler = nextSignal(signalHandler);
         }
     }
 
@@ -310,7 +308,7 @@ void QQmlEngineDebugService::buildObjectDump(QDataStream &message,
         message << fakeProperties[ii];
 }
 
-void QQmlEngineDebugService::prepareDeferredObjects(QObject *obj)
+void QQmlEngineDebugServiceImpl::prepareDeferredObjects(QObject *obj)
 {
     qmlExecuteDeferred(obj);
 
@@ -322,7 +320,7 @@ void QQmlEngineDebugService::prepareDeferredObjects(QObject *obj)
 
 }
 
-void QQmlEngineDebugService::storeObjectIds(QObject *co)
+void QQmlEngineDebugServiceImpl::storeObjectIds(QObject *co)
 {
     QQmlDebugService::idForObject(co);
     QObjectList children = co->children();
@@ -330,7 +328,7 @@ void QQmlEngineDebugService::storeObjectIds(QObject *co)
         storeObjectIds(children.at(ii));
 }
 
-void QQmlEngineDebugService::buildObjectList(QDataStream &message,
+void QQmlEngineDebugServiceImpl::buildObjectList(QDataStream &message,
                                              QQmlContext *ctxt,
                                              const QList<QPointer<QObject> > &instances)
 {
@@ -374,15 +372,15 @@ void QQmlEngineDebugService::buildObjectList(QDataStream &message,
     }
 }
 
-void QQmlEngineDebugService::buildStatesList(bool cleanList,
+void QQmlEngineDebugServiceImpl::buildStatesList(bool cleanList,
                                              const QList<QPointer<QObject> > &instances)
 {
     if (m_statesDelegate)
         m_statesDelegate->buildStatesList(cleanList, instances);
 }
 
-QQmlEngineDebugService::QQmlObjectData
-QQmlEngineDebugService::objectData(QObject *object)
+QQmlEngineDebugServiceImpl::QQmlObjectData
+QQmlEngineDebugServiceImpl::objectData(QObject *object)
 {
     QQmlData *ddata = QQmlData::get(object);
     QQmlObjectData rv;
@@ -421,7 +419,7 @@ QQmlEngineDebugService::objectData(QObject *object)
     return rv;
 }
 
-void QQmlEngineDebugService::messageReceived(const QByteArray &message)
+void QQmlEngineDebugServiceImpl::messageReceived(const QByteArray &message)
 {
     QMetaObject::invokeMethod(this, "processMessage", Qt::QueuedConnection, Q_ARG(QByteArray, message));
 }
@@ -429,7 +427,7 @@ void QQmlEngineDebugService::messageReceived(const QByteArray &message)
 /*!
     Returns a list of objects matching the given filename, line and column.
 */
-QList<QObject*> QQmlEngineDebugService::objectForLocationInfo(const QString &filename,
+QList<QObject*> QQmlEngineDebugServiceImpl::objectForLocationInfo(const QString &filename,
                                                               int lineNumber, int columnNumber)
 {
     QList<QObject *> objects;
@@ -447,7 +445,7 @@ QList<QObject*> QQmlEngineDebugService::objectForLocationInfo(const QString &fil
     return objects;
 }
 
-void QQmlEngineDebugService::processMessage(const QByteArray &message)
+void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message)
 {
     QQmlDebugStream ds(message);
 
@@ -629,7 +627,7 @@ void QQmlEngineDebugService::processMessage(const QByteArray &message)
     emit messageToClient(name(), reply);
 }
 
-bool QQmlEngineDebugService::setBinding(int objectId,
+bool QQmlEngineDebugServiceImpl::setBinding(int objectId,
                                                 const QString &propertyName,
                                                 const QVariant &expression,
                                                 bool isLiteralValue,
@@ -681,7 +679,7 @@ bool QQmlEngineDebugService::setBinding(int objectId,
     return ok;
 }
 
-bool QQmlEngineDebugService::resetBinding(int objectId, const QString &propertyName)
+bool QQmlEngineDebugServiceImpl::resetBinding(int objectId, const QString &propertyName)
 {
     QObject *object = objectForId(objectId);
     QQmlContext *context = qmlContext(object);
@@ -734,7 +732,7 @@ bool QQmlEngineDebugService::resetBinding(int objectId, const QString &propertyN
     return false;
 }
 
-bool QQmlEngineDebugService::setMethodBody(int objectId, const QString &method, const QString &body)
+bool QQmlEngineDebugServiceImpl::setMethodBody(int objectId, const QString &method, const QString &body)
 {
     QObject *object = objectForId(objectId);
     QQmlContext *context = qmlContext(object);
@@ -776,7 +774,7 @@ bool QQmlEngineDebugService::setMethodBody(int objectId, const QString &method,
     return true;
 }
 
-void QQmlEngineDebugService::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value)
+void QQmlEngineDebugServiceImpl::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value)
 {
     QByteArray reply;
     QQmlDebugStream rs(&reply, QIODevice::WriteOnly);
@@ -786,7 +784,7 @@ void QQmlEngineDebugService::propertyChanged(int id, int objectId, const QMetaPr
     emit messageToClient(name(), reply);
 }
 
-void QQmlEngineDebugService::engineAboutToBeAdded(QQmlEngine *engine)
+void QQmlEngineDebugServiceImpl::engineAboutToBeAdded(QQmlEngine *engine)
 {
     Q_ASSERT(engine);
     Q_ASSERT(!m_engines.contains(engine));
@@ -795,7 +793,7 @@ void QQmlEngineDebugService::engineAboutToBeAdded(QQmlEngine *engine)
     emit attachedToEngine(engine);
 }
 
-void QQmlEngineDebugService::engineAboutToBeRemoved(QQmlEngine *engine)
+void QQmlEngineDebugServiceImpl::engineAboutToBeRemoved(QQmlEngine *engine)
 {
     Q_ASSERT(engine);
     Q_ASSERT(m_engines.contains(engine));
@@ -804,7 +802,7 @@ void QQmlEngineDebugService::engineAboutToBeRemoved(QQmlEngine *engine)
     emit detachedFromEngine(engine);
 }
 
-void QQmlEngineDebugService::objectCreated(QQmlEngine *engine, QObject *object)
+void QQmlEngineDebugServiceImpl::objectCreated(QQmlEngine *engine, QObject *object)
 {
     Q_ASSERT(engine);
     Q_ASSERT(m_engines.contains(engine));
@@ -821,7 +819,7 @@ void QQmlEngineDebugService::objectCreated(QQmlEngine *engine, QObject *object)
     emit messageToClient(name(), reply);
 }
 
-void QQmlEngineDebugService::setStatesDelegate(QQmlDebugStatesDelegate *delegate)
+void QQmlEngineDebugServiceImpl::setStatesDelegate(QQmlDebugStatesDelegate *delegate)
 {
     m_statesDelegate = delegate;
 }
index a87d352..99a98e1 100644 (file)
@@ -46,6 +46,7 @@
 //
 
 #include <private/qqmldebugservice_p.h>
+#include <private/qqmldebugserviceinterfaces_p.h>
 
 #include <QtCore/qurl.h>
 #include <QtCore/qvariant.h>
@@ -59,12 +60,12 @@ class QQmlWatcher;
 class QDataStream;
 class QQmlDebugStatesDelegate;
 
-class Q_QML_PRIVATE_EXPORT QQmlEngineDebugService : public QQmlDebugService
+class Q_QML_PRIVATE_EXPORT QQmlEngineDebugServiceImpl : public QQmlEngineDebugService
 {
     Q_OBJECT
 public:
-    QQmlEngineDebugService(QObject * = 0);
-    ~QQmlEngineDebugService();
+    QQmlEngineDebugServiceImpl(QObject * = 0);
+    ~QQmlEngineDebugServiceImpl();
 
     struct QQmlObjectData {
         QUrl url;
@@ -94,7 +95,7 @@ public:
 
     void setStatesDelegate(QQmlDebugStatesDelegate *);
 
-    static QQmlEngineDebugService *instance();
+    static QQmlEngineDebugServiceImpl *instance();
 
 protected:
     virtual void messageReceived(const QByteArray &);
@@ -123,10 +124,10 @@ private:
     QQmlWatcher *m_watch;
     QQmlDebugStatesDelegate *m_statesDelegate;
 };
-Q_QML_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QQmlEngineDebugService::QQmlObjectData &);
-Q_QML_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QQmlEngineDebugService::QQmlObjectData &);
-Q_QML_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QQmlEngineDebugService::QQmlObjectProperty &);
-Q_QML_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QQmlEngineDebugService::QQmlObjectProperty &);
+Q_QML_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QQmlEngineDebugServiceImpl::QQmlObjectData &);
+Q_QML_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QQmlEngineDebugServiceImpl::QQmlObjectData &);
+Q_QML_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QQmlEngineDebugServiceImpl::QQmlObjectProperty &);
+Q_QML_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QQmlEngineDebugServiceImpl::QQmlObjectProperty &);
 
 QT_END_NAMESPACE
 
index c6ee8e4..f3ff13a 100644 (file)
@@ -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;
index e695757..61a350c 100644 (file)
 //
 
 #include "qqmldebugservice_p.h"
+#include "qqmldebugserviceinterfaces_p.h"
 
 #include <QtQml/qtqmlglobal.h>
 #include <QtCore/QList>
 
 QT_BEGIN_NAMESPACE
 
+namespace QmlJSDebugger { class AbstractViewInspector; }
 
 class QQmlInspectorInterface;
 
-class Q_QML_PRIVATE_EXPORT QQmlInspectorService : public QQmlDebugService
+class Q_QML_PRIVATE_EXPORT QQmlInspectorServiceImpl : public QQmlInspectorService
 {
     Q_OBJECT
 
 public:
-    QQmlInspectorService();
-    static QQmlInspectorService *instance();
+    QQmlInspectorServiceImpl();
+    static QQmlInspectorServiceImpl *instance();
 
     void addView(QObject *);
     void removeView(QObject *);
@@ -75,6 +77,7 @@ private Q_SLOTS:
     void updateState();
 
 private:
+    friend class QmlJSDebugger::AbstractViewInspector;
     void loadInspectorPlugins();
 
     QList<QObject*> m_views;
index 2b26cdc..a858dcf 100644 (file)
 
 QT_BEGIN_NAMESPACE
 
-Q_GLOBAL_STATIC(QQmlProfilerService, profilerInstance)
+Q_GLOBAL_STATIC(QQmlProfilerServiceImpl, profilerInstance)
 
-QQmlProfilerService::QQmlProfilerService()
-    : QQmlConfigurableDebugService<QQmlDebugService>(QStringLiteral("CanvasFrameRate"), 1),
+QQmlProfilerServiceImpl::QQmlProfilerServiceImpl()
+    : QQmlConfigurableDebugService<QQmlProfilerService>(1),
       m_waitingForStop(false)
 {
     m_timer.start();
 }
 
-QQmlProfilerService::~QQmlProfilerService()
+QQmlProfilerServiceImpl::~QQmlProfilerServiceImpl()
 {
     // No need to lock here. If any engine or global profiler is still trying to register at this
     // point we have a nasty bug anyway.
@@ -62,7 +62,7 @@ QQmlProfilerService::~QQmlProfilerService()
     qDeleteAll(m_globalProfilers);
 }
 
-void QQmlProfilerService::dataReady(QQmlAbstractProfilerAdapter *profiler)
+void QQmlProfilerServiceImpl::dataReady(QQmlAbstractProfilerAdapter *profiler)
 {
     QMutexLocker lock(&m_configMutex);
     bool dataComplete = true;
@@ -94,13 +94,13 @@ void QQmlProfilerService::dataReady(QQmlAbstractProfilerAdapter *profiler)
     }
 }
 
-QQmlProfilerService *QQmlProfilerService::instance()
+QQmlProfilerServiceImpl *QQmlProfilerServiceImpl::instance()
 {
     // just make sure that the service is properly registered
     return profilerInstance();
 }
 
-void QQmlProfilerService::engineAboutToBeAdded(QQmlEngine *engine)
+void QQmlProfilerServiceImpl::engineAboutToBeAdded(QQmlEngine *engine)
 {
     Q_ASSERT_X(QThread::currentThread() == engine->thread(), Q_FUNC_INFO,
                "QML profilers have to be added from the engine thread");
@@ -110,10 +110,10 @@ void QQmlProfilerService::engineAboutToBeAdded(QQmlEngine *engine)
     QV4ProfilerAdapter *v4Adapter = new QV4ProfilerAdapter(this, QV8Engine::getV4(engine->handle()));
     addEngineProfiler(qmlAdapter, engine);
     addEngineProfiler(v4Adapter, engine);
-    QQmlConfigurableDebugService<QQmlDebugService>::engineAboutToBeAdded(engine);
+    QQmlConfigurableDebugService<QQmlProfilerService>::engineAboutToBeAdded(engine);
 }
 
-void QQmlProfilerService::engineAdded(QQmlEngine *engine)
+void QQmlProfilerServiceImpl::engineAdded(QQmlEngine *engine)
 {
     Q_ASSERT_X(QThread::currentThread() == engine->thread(), Q_FUNC_INFO,
                "QML profilers have to be added from the engine thread");
@@ -123,7 +123,7 @@ void QQmlProfilerService::engineAdded(QQmlEngine *engine)
         profiler->stopWaiting();
 }
 
-void QQmlProfilerService::engineAboutToBeRemoved(QQmlEngine *engine)
+void QQmlProfilerServiceImpl::engineAboutToBeRemoved(QQmlEngine *engine)
 {
     Q_ASSERT_X(QThread::currentThread() == engine->thread(), Q_FUNC_INFO,
                "QML profilers have to be removed from the engine thread");
@@ -143,7 +143,7 @@ void QQmlProfilerService::engineAboutToBeRemoved(QQmlEngine *engine)
     }
 }
 
-void QQmlProfilerService::engineRemoved(QQmlEngine *engine)
+void QQmlProfilerServiceImpl::engineRemoved(QQmlEngine *engine)
 {
     Q_ASSERT_X(QThread::currentThread() == engine->thread(), Q_FUNC_INFO,
                "QML profilers have to be removed from the engine thread");
@@ -156,14 +156,14 @@ void QQmlProfilerService::engineRemoved(QQmlEngine *engine)
     m_engineProfilers.remove(engine);
 }
 
-void QQmlProfilerService::addEngineProfiler(QQmlAbstractProfilerAdapter *profiler, QQmlEngine *engine)
+void QQmlProfilerServiceImpl::addEngineProfiler(QQmlAbstractProfilerAdapter *profiler, QQmlEngine *engine)
 {
     profiler->moveToThread(thread());
     profiler->synchronize(m_timer);
     m_engineProfilers.insert(engine, profiler);
 }
 
-void QQmlProfilerService::addGlobalProfiler(QQmlAbstractProfilerAdapter *profiler)
+void QQmlProfilerServiceImpl::addGlobalProfiler(QQmlAbstractProfilerAdapter *profiler)
 {
     QMutexLocker lock(&m_configMutex);
     profiler->synchronize(m_timer);
@@ -179,7 +179,7 @@ void QQmlProfilerService::addGlobalProfiler(QQmlAbstractProfilerAdapter *profile
         profiler->startProfiling(features);
 }
 
-void QQmlProfilerService::removeGlobalProfiler(QQmlAbstractProfilerAdapter *profiler)
+void QQmlProfilerServiceImpl::removeGlobalProfiler(QQmlAbstractProfilerAdapter *profiler)
 {
     QMutexLocker lock(&m_configMutex);
     removeProfilerFromStartTimes(profiler);
@@ -187,7 +187,7 @@ void QQmlProfilerService::removeGlobalProfiler(QQmlAbstractProfilerAdapter *prof
     delete profiler;
 }
 
-void QQmlProfilerService::removeProfilerFromStartTimes(const QQmlAbstractProfilerAdapter *profiler)
+void QQmlProfilerServiceImpl::removeProfilerFromStartTimes(const QQmlAbstractProfilerAdapter *profiler)
 {
     for (QMultiMap<qint64, QQmlAbstractProfilerAdapter *>::iterator i(m_startTimes.begin());
             i != m_startTimes.end();) {
@@ -206,7 +206,7 @@ void QQmlProfilerService::removeProfilerFromStartTimes(const QQmlAbstractProfile
  *
  * If any engine profiler is started like that also start all global profilers.
  */
-void QQmlProfilerService::startProfiling(QQmlEngine *engine, quint64 features)
+void QQmlProfilerServiceImpl::startProfiling(QQmlEngine *engine, quint64 features)
 {
     QMutexLocker lock(&m_configMutex);
 
@@ -257,7 +257,7 @@ void QQmlProfilerService::startProfiling(QQmlEngine *engine, quint64 features)
  * If afterwards no more engine profilers are running, also stop all global profilers. Otherwise
  * only make them report their data.
  */
-void QQmlProfilerService::stopProfiling(QQmlEngine *engine)
+void QQmlProfilerServiceImpl::stopProfiling(QQmlEngine *engine)
 {
     QMutexLocker lock(&m_configMutex);
     QList<QQmlAbstractProfilerAdapter *> stopping;
@@ -303,7 +303,7 @@ void QQmlProfilerService::stopProfiling(QQmlEngine *engine)
 /*
     Send the queued up messages.
 */
-void QQmlProfilerService::sendMessages()
+void QQmlProfilerServiceImpl::sendMessages()
 {
     QList<QByteArray> messages;
 
@@ -359,7 +359,7 @@ void QQmlProfilerService::sendMessages()
     }
 }
 
-void QQmlProfilerService::stateAboutToBeChanged(QQmlDebugService::State newState)
+void QQmlProfilerServiceImpl::stateAboutToBeChanged(QQmlDebugService::State newState)
 {
     QMutexLocker lock(&m_configMutex);
 
@@ -373,7 +373,7 @@ void QQmlProfilerService::stateAboutToBeChanged(QQmlDebugService::State newState
     }
 }
 
-void QQmlProfilerService::messageReceived(const QByteArray &message)
+void QQmlProfilerServiceImpl::messageReceived(const QByteArray &message)
 {
     QMutexLocker lock(&m_configMutex);
 
@@ -412,7 +412,7 @@ void QQmlProfilerService::messageReceived(const QByteArray &message)
     stopWaiting();
 }
 
-void QQmlProfilerService::flush()
+void QQmlProfilerServiceImpl::flush()
 {
     QMutexLocker lock(&m_configMutex);
 
index d593c43..ea73216 100644 (file)
@@ -46,6 +46,7 @@
 //
 
 #include "qqmlconfigurabledebugservice_p.h"
+#include "qqmldebugserviceinterfaces_p.h"
 #include "qqmlprofilerdefinitions_p.h"
 #include "qqmlabstractprofileradapter_p.h"
 
@@ -67,14 +68,14 @@ class QUrl;
 class QQmlEngine;
 
 
-class Q_QML_PRIVATE_EXPORT QQmlProfilerService :
-        public QQmlConfigurableDebugService<QQmlDebugService>,
+class Q_QML_PRIVATE_EXPORT QQmlProfilerServiceImpl :
+        public QQmlConfigurableDebugService<QQmlProfilerService>,
         public QQmlProfilerDefinitions
 {
     Q_OBJECT
 public:
 
-    static QQmlProfilerService *instance();
+    static QQmlProfilerServiceImpl *instance();
     void engineAboutToBeAdded(QQmlEngine *engine);
     void engineAboutToBeRemoved(QQmlEngine *engine);
     void engineAdded(QQmlEngine *engine);
@@ -86,8 +87,8 @@ public:
     void startProfiling(QQmlEngine *engine, quint64 features = std::numeric_limits<quint64>::max());
     void stopProfiling(QQmlEngine *engine);
 
-    QQmlProfilerService();
-    ~QQmlProfilerService();
+    QQmlProfilerServiceImpl();
+    ~QQmlProfilerServiceImpl();
 
     void dataReady(QQmlAbstractProfilerAdapter *profiler);
 
index 63673a0..94755bd 100644 (file)
@@ -58,7 +58,7 @@ const char *const V4_PAUSE = "interrupt";
 
 QT_BEGIN_NAMESPACE
 
-Q_GLOBAL_STATIC(QV4DebugService, v4ServiceInstance)
+Q_GLOBAL_STATIC(QV4DebugServiceImpl, v4ServiceInstance)
 
 class V8CommandHandler;
 class UnknownV8CommandHandler;
@@ -305,8 +305,8 @@ private:
     QHash<QV4::Object *, int> objectRefs;
 };
 
-int QV4DebugService::debuggerIndex = 0;
-int QV4DebugService::sequence = 0;
+int QV4DebugServiceImpl::debuggerIndex = 0;
+int QV4DebugServiceImpl::sequence = 0;
 
 class V8CommandHandler
 {
@@ -320,7 +320,7 @@ public:
 
     QString command() const { return cmd; }
 
-    void handle(const QJsonObject &request, QV4DebugService *s)
+    void handle(const QJsonObject &request, QV4DebugServiceImpl *s)
     {
         TRACE_PROTOCOL(qDebug() << "handling command" << command() << "...");
 
@@ -378,7 +378,7 @@ protected:
     QString cmd;
     QJsonObject req;
     QJsonValue seq;
-    QV4DebugService *debugService;
+    QV4DebugServiceImpl *debugService;
     QJsonObject response;
 };
 
@@ -817,12 +817,12 @@ public:
 };
 } // anonymous namespace
 
-void QV4DebugService::addHandler(V8CommandHandler* handler)
+void QV4DebugServiceImpl::addHandler(V8CommandHandler* handler)
 {
     handlers[handler->command()] = handler;
 }
 
-V8CommandHandler *QV4DebugService::v8CommandHandler(const QString &command) const
+V8CommandHandler *QV4DebugServiceImpl::v8CommandHandler(const QString &command) const
 {
     V8CommandHandler *handler = handlers.value(command, 0);
     if (handler)
@@ -831,8 +831,8 @@ V8CommandHandler *QV4DebugService::v8CommandHandler(const QString &command) cons
         return unknownV8CommandHandler.data();
 }
 
-QV4DebugService::QV4DebugService(QObject *parent) :
-    QQmlConfigurableDebugService<QQmlDebugService>(QStringLiteral("V8Debugger"), 1, parent),
+QV4DebugServiceImpl::QV4DebugServiceImpl(QObject *parent) :
+    QQmlConfigurableDebugService<QV4DebugService>(1, parent),
     debuggerAgent(this), version(1), theSelectedFrame(0),
     unknownV8CommandHandler(new UnknownV8CommandHandler)
 {
@@ -850,17 +850,17 @@ QV4DebugService::QV4DebugService(QObject *parent) :
     addHandler(new V8EvaluateRequest);
 }
 
-QV4DebugService::~QV4DebugService()
+QV4DebugServiceImpl::~QV4DebugServiceImpl()
 {
     qDeleteAll(handlers);
 }
 
-QV4DebugService *QV4DebugService::instance()
+QV4DebugServiceImpl *QV4DebugServiceImpl::instance()
 {
     return v4ServiceInstance();
 }
 
-void QV4DebugService::engineAboutToBeAdded(QQmlEngine *engine)
+void QV4DebugServiceImpl::engineAboutToBeAdded(QQmlEngine *engine)
 {
     QMutexLocker lock(&m_configMutex);
     if (engine) {
@@ -876,10 +876,10 @@ void QV4DebugService::engineAboutToBeAdded(QQmlEngine *engine)
             }
         }
     }
-    QQmlConfigurableDebugService<QQmlDebugService>::engineAboutToBeAdded(engine);
+    QQmlConfigurableDebugService<QV4DebugService>::engineAboutToBeAdded(engine);
 }
 
-void QV4DebugService::engineAboutToBeRemoved(QQmlEngine *engine)
+void QV4DebugServiceImpl::engineAboutToBeRemoved(QQmlEngine *engine)
 {
     QMutexLocker lock(&m_configMutex);
     if (engine){
@@ -897,10 +897,10 @@ void QV4DebugService::engineAboutToBeRemoved(QQmlEngine *engine)
             debuggerAgent.removeDebugger(debugger);
         }
     }
-    QQmlConfigurableDebugService<QQmlDebugService>::engineAboutToBeRemoved(engine);
+    QQmlConfigurableDebugService<QV4DebugService>::engineAboutToBeRemoved(engine);
 }
 
-void QV4DebugService::signalEmitted(const QString &signal)
+void QV4DebugServiceImpl::signalEmitted(const QString &signal)
 {
     //This function is only called by QQmlBoundSignal
     //only if there is a slot connected to the signal. Hence, there
@@ -918,7 +918,7 @@ void QV4DebugService::signalEmitted(const QString &signal)
     }
 }
 
-void QV4DebugService::messageReceived(const QByteArray &message)
+void QV4DebugServiceImpl::messageReceived(const QByteArray &message)
 {
     QMutexLocker lock(&m_configMutex);
 
@@ -961,7 +961,7 @@ void QV4DebugService::messageReceived(const QByteArray &message)
     }
 }
 
-void QV4DebugService::sendSomethingToSomebody(const char *type, int magicNumber)
+void QV4DebugServiceImpl::sendSomethingToSomebody(const char *type, int magicNumber)
 {
     QByteArray response;
     QQmlDebugStream rs(&response, QIODevice::WriteOnly);
@@ -970,7 +970,7 @@ void QV4DebugService::sendSomethingToSomebody(const char *type, int magicNumber)
     emit messageToClient(name(), packMessage(type, response));
 }
 
-QV4DebuggerAgent::QV4DebuggerAgent(QV4DebugService *debugService)
+QV4DebuggerAgent::QV4DebuggerAgent(QV4DebugServiceImpl *debugService)
     : debugService(debugService)
 {}
 
@@ -1054,7 +1054,7 @@ void QV4DebuggerAgent::sourcesCollected(QV4::Debugging::Debugger *debugger, QStr
     debugService->send(response);
 }
 
-void QV4DebugService::handleV8Request(const QByteArray &payload)
+void QV4DebugServiceImpl::handleV8Request(const QByteArray &payload)
 {
     TRACE_PROTOCOL(qDebug() << "v8request, payload:" << payload.constData());
 
@@ -1069,7 +1069,7 @@ void QV4DebugService::handleV8Request(const QByteArray &payload)
     }
 }
 
-QByteArray QV4DebugService::packMessage(const QByteArray &command, const QByteArray &message)
+QByteArray QV4DebugServiceImpl::packMessage(const QByteArray &command, const QByteArray &message)
 {
     QByteArray reply;
     QQmlDebugStream rs(&reply, QIODevice::WriteOnly);
@@ -1078,7 +1078,7 @@ QByteArray QV4DebugService::packMessage(const QByteArray &command, const QByteAr
     return reply;
 }
 
-void QV4DebugService::send(QJsonObject v8Payload)
+void QV4DebugServiceImpl::send(QJsonObject v8Payload)
 {
     v8Payload[QLatin1String("seq")] = sequence++;
     QJsonDocument doc;
@@ -1094,12 +1094,12 @@ void QV4DebugService::send(QJsonObject v8Payload)
     emit messageToClient(name(), packMessage("v8message", responseData));
 }
 
-void QV4DebugService::clearHandles(QV4::ExecutionEngine *engine)
+void QV4DebugServiceImpl::clearHandles(QV4::ExecutionEngine *engine)
 {
     theCollector.reset(new VariableCollector(engine));
 }
 
-QJsonObject QV4DebugService::buildFrame(const QV4::StackFrame &stackFrame, int frameNr,
+QJsonObject QV4DebugServiceImpl::buildFrame(const QV4::StackFrame &stackFrame, int frameNr,
                                         QV4::Debugging::Debugger *debugger)
 {
     QJsonObject frame;
@@ -1137,7 +1137,7 @@ QJsonObject QV4DebugService::buildFrame(const QV4::StackFrame &stackFrame, int f
     return frame;
 }
 
-int QV4DebugService::encodeScopeType(QV4::Heap::ExecutionContext::ContextType scopeType)
+int QV4DebugServiceImpl::encodeScopeType(QV4::Heap::ExecutionContext::ContextType scopeType)
 {
     switch (scopeType) {
     case QV4::Heap::ExecutionContext::Type_GlobalContext:
@@ -1159,7 +1159,7 @@ int QV4DebugService::encodeScopeType(QV4::Heap::ExecutionContext::ContextType sc
     }
 }
 
-QJsonObject QV4DebugService::buildScope(int frameNr, int scopeNr,
+QJsonObject QV4DebugServiceImpl::buildScope(int frameNr, int scopeNr,
                                         QV4::Debugging::Debugger *debugger)
 {
     QJsonObject scope;
@@ -1179,27 +1179,27 @@ QJsonObject QV4DebugService::buildScope(int frameNr, int scopeNr,
     return scope;
 }
 
-QJsonValue QV4DebugService::lookup(int refId) const
+QJsonValue QV4DebugServiceImpl::lookup(int refId) const
 {
     return theCollector->lookup(refId);
 }
 
-QJsonArray QV4DebugService::buildRefs()
+QJsonArray QV4DebugServiceImpl::buildRefs()
 {
     return theCollector->retrieveRefsToInclude();
 }
 
-VariableCollector *QV4DebugService::collector() const
+VariableCollector *QV4DebugServiceImpl::collector() const
 {
     return theCollector.data();
 }
 
-void QV4DebugService::selectFrame(int frameNr)
+void QV4DebugServiceImpl::selectFrame(int frameNr)
 {
     theSelectedFrame = frameNr;
 }
 
-int QV4DebugService::selectedFrame() const
+int QV4DebugServiceImpl::selectedFrame() const
 {
     return theSelectedFrame;
 }
index 4e7806f..fee0e0a 100644 (file)
@@ -46,6 +46,7 @@
 //
 
 #include "qqmlconfigurabledebugservice_p.h"
+#include "qqmldebugserviceinterfaces_p.h"
 #include <private/qv4debugging_p.h>
 
 #include <QtCore/QJsonValue>
@@ -58,13 +59,13 @@ class QQmlEngine;
 class VariableCollector;
 class V8CommandHandler;
 class UnknownV8CommandHandler;
-class QV4DebugService;
+class QV4DebugServiceImpl;
 
 class QV4DebuggerAgent : public QV4::Debugging::DebuggerAgent
 {
     Q_OBJECT
 public:
-    QV4DebuggerAgent(QV4DebugService *debugService);
+    QV4DebuggerAgent(QV4DebugServiceImpl *debugService);
     QV4::Debugging::Debugger *firstDebugger() const;
     bool isRunning() const;
 
@@ -75,17 +76,17 @@ public slots:
                                   int requestSequenceNr);
 
 private:
-    QV4DebugService *debugService;
+    QV4DebugServiceImpl *debugService;
 };
 
-class QV4DebugService : public QQmlConfigurableDebugService<QQmlDebugService>
+class QV4DebugServiceImpl : public QQmlConfigurableDebugService<QV4DebugService>
 {
     Q_OBJECT
 public:
-    explicit QV4DebugService(QObject *parent = 0);
-    ~QV4DebugService();
+    explicit QV4DebugServiceImpl(QObject *parent = 0);
+    ~QV4DebugServiceImpl();
 
-    static QV4DebugService *instance();
+    static QV4DebugServiceImpl *instance();
     void engineAboutToBeAdded(QQmlEngine *engine);
     void engineAboutToBeRemoved(QQmlEngine *engine);
 
index e0cd594..9577e10 100644 (file)
@@ -321,7 +321,7 @@ void QQmlBoundSignal_callback(QQmlNotifierEndpoint *e, void **a)
         return;
 
     if (QQmlDebugConnector::instance())
-        QV4DebugService::instance()->signalEmitted(QString::fromLatin1(QMetaObjectPrivate::signal(s->m_expression->target()->metaObject(), s->signalIndex()).methodSignature()));
+        QV4DebugServiceImpl::instance()->signalEmitted(QString::fromLatin1(QMetaObjectPrivate::signal(s->m_expression->target()->metaObject(), s->signalIndex()).methodSignature()));
 
     QQmlEngine *engine;
     if (s->m_expression && (engine = s->m_expression->engine())) {
index d46f612..efa4270 100644 (file)
@@ -898,7 +898,7 @@ QQmlComponentPrivate::beginCreate(QQmlContextData *context)
     if (enginePriv->isDebugging && rv) {
         if (!context->isInternal)
             context->asQQmlContextPrivate()->instances.append(rv);
-        QQmlEngineDebugService::instance()->objectCreated(engine, rv);
+        QQmlEngineDebugServiceImpl::instance()->objectCreated(engine, rv);
     }
 
     return rv;
index f2918bb..4f750bb 100644 (file)
@@ -1451,7 +1451,7 @@ QV4::ReturnedValue ConsoleObject::method_profile(CallContext *ctx)
     if (!QQmlDebugConnector::instance()) {
         logger.warning("Cannot start profiling because debug service is disabled. Start with -qmljsdebugger=port:XXXXX.");
     } else {
-        QQmlProfilerService::instance()->startProfiling(v4->qmlEngine());
+        QQmlProfilerServiceImpl::instance()->startProfiling(v4->qmlEngine());
         logger.debug("Profiling started.");
     }
 
@@ -1470,7 +1470,7 @@ QV4::ReturnedValue ConsoleObject::method_profileEnd(CallContext *ctx)
     if (!QQmlDebugConnector::instance()) {
         logger.warning("Ignoring console.profileEnd(): the debug service is disabled.");
     } else {
-        QQmlProfilerService::instance()->stopProfiling(v4->qmlEngine());
+        QQmlProfilerServiceImpl::instance()->stopProfiling(v4->qmlEngine());
         logger.debug("Profiling ended.");
     }
 
index ff1f225..2fbd68b 100644 (file)
@@ -88,7 +88,7 @@ void QQuickViewPrivate::init(QQmlEngine* e)
     }
 
     if (QQmlDebugConnector::instance())
-        QQmlInspectorService::instance()->addView(q);
+        QQmlInspectorServiceImpl::instance()->addView(q);
 }
 
 QQuickViewPrivate::QQuickViewPrivate()
@@ -99,7 +99,7 @@ QQuickViewPrivate::QQuickViewPrivate()
 QQuickViewPrivate::~QQuickViewPrivate()
 {
     if (QQmlDebugConnector::instance())
-        QQmlInspectorService::instance()->removeView(q_func());
+        QQmlInspectorServiceImpl::instance()->removeView(q_func());
 }
 
 void QQuickViewPrivate::execute()
index 3e7811e..acf7c3e 100644 (file)
@@ -188,7 +188,7 @@ void QQmlQtQuick2Module::defineModule()
 #endif
 
     if (QQmlDebugConnector::instance()) {
-        QQmlEngineDebugService::instance()->setStatesDelegate(
+        QQmlEngineDebugServiceImpl::instance()->setStatesDelegate(
                     new QQmlQtQuick2DebugStatesDelegate);
         QQuickProfiler::initialize();
     }
index 7bd32f0..c3cd062 100644 (file)
@@ -127,9 +127,9 @@ qint64 QQuickProfiler::sendMessages(qint64 until, QList<QByteArray> &messages)
 void QQuickProfiler::initialize()
 {
     Q_ASSERT(s_instance == 0);
-    QQmlProfilerService *service = QQmlProfilerService::instance();
+    QQmlProfilerServiceImpl *service = QQmlProfilerServiceImpl::instance();
     s_instance = new QQuickProfiler(service);
-    QQmlProfilerService::instance()->addGlobalProfiler(s_instance);
+    QQmlProfilerServiceImpl::instance()->addGlobalProfiler(s_instance);
 }
 
 void animationTimerCallback(qint64 delta)
index 553dba3..e6892bd 100644 (file)
@@ -97,7 +97,7 @@ void QQuickWidgetPrivate::init(QQmlEngine* e)
         engine.data()->setIncubationController(offscreenWindow->incubationController());
 
     if (QQmlDebugConnector::instance())
-        QQmlInspectorService::instance()->addView(q);
+        QQmlInspectorServiceImpl::instance()->addView(q);
 
 #ifndef QT_NO_DRAGANDDROP
     q->setAcceptDrops(true);
@@ -150,7 +150,7 @@ QQuickWidgetPrivate::QQuickWidgetPrivate()
 QQuickWidgetPrivate::~QQuickWidgetPrivate()
 {
     if (QQmlDebugConnector::instance())
-        QQmlInspectorService::instance()->removeView(q_func());
+        QQmlInspectorServiceImpl::instance()->removeView(q_func());
 
     invalidateRenderControl();