aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-04 15:08:24 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-05 08:42:59 +0000
commitfcc5a39d60b14e8ec2345b3695b84b552501dfa1 (patch)
tree74470e28a50f7d1934649a921fb5b0cd42cd5293 /src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
parenta773d3646769ba6134adfc7353b64d7f73b2e543 (diff)
QmlDebug: Extract header from native connector
We will need to access the connector from the hook functions. Having a header makes that easier. Change-Id: Idbab8f6c73e3c61d82cdfc7a91ff6c4e408ee1fd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp')
-rw-r--r--src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp48
1 files changed, 4 insertions, 44 deletions
diff --git a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
index 018b10d3e7..faddaefdc7 100644
--- a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
+++ b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp
@@ -31,7 +31,7 @@
**
****************************************************************************/
-#include <private/qqmldebugconnector_p.h>
+#include "qqmlnativedebugconnector.h"
#include <private/qhooks_p.h>
#include <private/qpacket_p.h>
@@ -43,7 +43,6 @@
#include <QtCore/qjsonobject.h>
#include <QtCore/qjsonvalue.h>
#include <QtCore/qpointer.h>
-#include <QtCore/qvector.h>
//#define TRACE_PROTOCOL(s) qDebug() << s
#define TRACE_PROTOCOL(s)
@@ -173,33 +172,6 @@ Q_DECL_EXPORT void qt_qmlDebugConnectorOpen()
QT_BEGIN_NAMESPACE
-class QQmlNativeDebugConnector : public QQmlDebugConnector
-{
- Q_OBJECT
-
-public:
- QQmlNativeDebugConnector();
- ~QQmlNativeDebugConnector();
-
- bool blockingMode() const;
- QQmlDebugService *service(const QString &name) const;
- void addEngine(QQmlEngine *engine);
- void removeEngine(QQmlEngine *engine);
- bool addService(const QString &name, QQmlDebugService *service);
- bool removeService(const QString &name);
- bool open(const QVariantHash &configuration);
-
-private slots:
- void sendMessage(const QString &name, const QByteArray &message);
- void sendMessages(const QString &name, const QList<QByteArray> &messages);
-
-private:
- void announceObjectAvailability(const QString &objectType, QObject *object, bool available);
-
- QVector<QQmlDebugService *> m_services;
- bool m_blockingMode;
-};
-
QQmlNativeDebugConnector::QQmlNativeDebugConnector()
: m_blockingMode(false)
{
@@ -364,21 +336,9 @@ void QQmlNativeDebugConnector::sendMessages(const QString &name, const QList<QBy
sendMessage(name, messages.at(i));
}
-class QQmlNativeDebugConnectorFactory : public QQmlDebugConnectorFactory
+QQmlDebugConnector *QQmlNativeDebugConnectorFactory::create(const QString &key)
{
- Q_OBJECT
-
- Q_PLUGIN_METADATA(IID QQmlDebugConnectorFactory_iid FILE "qqmlnativedebugconnector.json")
-
-public:
- QQmlNativeDebugConnectorFactory() {}
-
- QQmlDebugConnector *create(const QString &key)
- {
- return key == QLatin1String("QQmlNativeDebugConnector") ? new QQmlNativeDebugConnector : 0;
- }
-};
+ return key == QLatin1String("QQmlNativeDebugConnector") ? new QQmlNativeDebugConnector : 0;
+}
QT_END_NAMESPACE
-
-#include "qqmlnativedebugconnector.moc"