SOURCES += \
$$PWD/qpacketprotocol.cpp \
$$PWD/qqmldebugservice.cpp \
- $$PWD/qqmldebugclient.cpp \
- $$PWD/qqmlenginedebug.cpp \
$$PWD/qqmlprofilerservice.cpp \
$$PWD/qqmldebugserver.cpp \
$$PWD/qqmlinspectorservice.cpp \
$$PWD/qpacketprotocol_p.h \
$$PWD/qqmldebugservice_p.h \
$$PWD/qqmldebugservice_p_p.h \
- $$PWD/qqmldebugclient_p.h \
- $$PWD/qqmlenginedebug_p.h \
$$PWD/qqmlprofilerservice_p.h \
$$PWD/qqmldebugserver_p.h \
$$PWD/qqmldebugserverconnection_p.h \
TEMPLATE = subdirs
PRIVATETESTS += \
- qqmlenginedebug \
+ qqmlenginedebugservice \
qqmldebugclient \
qqmldebugservice \
qqmldebugjs \
QT += network qml-private testlib
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
-
-SOURCES += tst_qdebugmessageservice.cpp \
- ../shared/debugutil.cpp
+SOURCES += tst_qdebugmessageservice.cpp
INCLUDEPATH += ../shared
-
include(../../../shared/util.pri)
+include(../shared/debugutil.pri)
TESTDATA = data/*
**
****************************************************************************/
-#include <QtQml/private/qqmldebugclient_p.h>
+#include "qqmldebugclient.h"
//QQmlDebugTest
-#include "../shared/debugutil_p.h"
+#include "debugutil_p.h"
#include "../../../shared/util.h"
#include <QtCore/QString>
TARGET = tst_qpacketprotocol
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
-SOURCES += tst_qpacketprotocol.cpp \
- ../shared/debugutil.cpp
+SOURCES += tst_qpacketprotocol.cpp
+
+INCLUDEPATH += ../shared
+include(../shared/debugutil.pri)
CONFIG += parallel_test
QT += qml-private network testlib
#include <private/qpacketprotocol_p.h>
-#include "../shared/debugutil_p.h"
+#include "debugutil_p.h"
class tst_QPacketProtocol : public QObject
{
TARGET = tst_qqmldebugclient
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
-SOURCES += tst_qqmldebugclient.cpp \
- ../shared/debugutil.cpp
+SOURCES += tst_qqmldebugclient.cpp
+
+INCLUDEPATH += ../shared
+include(../shared/debugutil.pri)
CONFIG += declarative_debug
#include <QtQml/qqmlengine.h>
-#include "../shared/debugutil_p.h"
+#include "debugutil_p.h"
#define PORT 13770
#define STR_PORT "13770"
QT += qml-private testlib
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
-SOURCES += tst_qqmldebugjs.cpp \
- ../shared/debugutil.cpp
+SOURCES += tst_qqmldebugjs.cpp
INCLUDEPATH += ../shared
-
-include (../../../shared/util.pri)
+include(../../../shared/util.pri)
+include(../shared/debugutil.pri)
TESTDATA = data/*
#include <QtCore/QDir>
#include <QtCore/QMutex>
#include <QtCore/QLibraryInfo>
-#include <QtQml/private/qqmldebugclient_p.h>
#include <QtQml/QJSEngine>
//QQmlDebugTest
-#include "../shared/debugutil_p.h"
+#include "debugutil_p.h"
+#include "qqmldebugclient.h"
#include "../../../shared/util.h"
const char *V8REQUEST = "v8request";
TARGET = tst_qqmldebugservice
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
-SOURCES += tst_qqmldebugservice.cpp \
- ../shared/debugutil.cpp
+SOURCES += tst_qqmldebugservice.cpp
+INCLUDEPATH += ../shared
+include(../../../shared/util.pri)
+include(../shared/debugutil.pri)
CONFIG += parallel_test declarative_debug
#include <QtQml/qqmlengine.h>
-#include <private/qqmldebugclient_p.h>
#include <private/qqmldebugservice_p.h>
#include "../../../shared/util.h"
-#include "../shared/debugutil_p.h"
+#include "debugutil_p.h"
+#include "qqmldebugclient.h"
#define PORT 13769
#define STR_PORT "13769"
CONFIG += testcase
-TARGET = tst_qqmlenginedebug
+TARGET = tst_qqmlenginedebugservice
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
-SOURCES += tst_qqmlenginedebug.cpp \
- ../shared/debugutil.cpp
+SOURCES += tst_qqmlenginedebugservice.cpp
+
+INCLUDEPATH += ../shared
+include(../shared/debugutil.pri)
CONFIG += parallel_test declarative_debug
#include <private/qqmlbinding_p.h>
#include <private/qqmlboundsignal_p.h>
-#include <private/qqmlenginedebug_p.h>
#include <private/qqmldebugservice_p.h>
#include <private/qqmlmetatype_p.h>
#include <private/qqmlproperty_p.h>
-#include "../shared/debugutil_p.h"
+#include "debugutil_p.h"
+#include "qqmlenginedebug_p.h"
Q_DECLARE_METATYPE(QQmlDebugWatch::State)
-class tst_QQmlEngineDebug : public QObject
+class tst_QQmlEngineDebugService : public QObject
{
Q_OBJECT
QML_DECLARE_TYPE(NonScriptProperty)
-QQmlDebugObjectReference tst_QQmlEngineDebug::findRootObject(int context, bool recursive)
+QQmlDebugObjectReference tst_QQmlEngineDebugService::findRootObject(int context, bool recursive)
{
QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
waitForQuery(q_engines);
return result;
}
-QQmlDebugPropertyReference tst_QQmlEngineDebug::findProperty(const QList<QQmlDebugPropertyReference> &props, const QString &name) const
+QQmlDebugPropertyReference tst_QQmlEngineDebugService::findProperty(const QList<QQmlDebugPropertyReference> &props, const QString &name) const
{
foreach(const QQmlDebugPropertyReference &p, props) {
if (p.name() == name)
return QQmlDebugPropertyReference();
}
-void tst_QQmlEngineDebug::waitForQuery(QQmlDebugQuery *query)
+void tst_QQmlEngineDebugService::waitForQuery(QQmlDebugQuery *query)
{
QVERIFY(query);
QCOMPARE(query->parent(), qobject_cast<QObject*>(this));
QFAIL("query timed out");
}
-void tst_QQmlEngineDebug::recursiveObjectTest(QObject *o, const QQmlDebugObjectReference &oref, bool recursive) const
+void tst_QQmlEngineDebugService::recursiveObjectTest(QObject *o, const QQmlDebugObjectReference &oref, bool recursive) const
{
const QMetaObject *meta = o->metaObject();
}
}
-void tst_QQmlEngineDebug::recursiveCompareObjects(const QQmlDebugObjectReference &a, const QQmlDebugObjectReference &b) const
+void tst_QQmlEngineDebugService::recursiveCompareObjects(const QQmlDebugObjectReference &a, const QQmlDebugObjectReference &b) const
{
QCOMPARE(a.debugId(), b.debugId());
QCOMPARE(a.className(), b.className());
recursiveCompareObjects(a.children()[i], b.children()[i]);
}
-void tst_QQmlEngineDebug::recursiveCompareContexts(const QQmlDebugContextReference &a, const QQmlDebugContextReference &b) const
+void tst_QQmlEngineDebugService::recursiveCompareContexts(const QQmlDebugContextReference &a, const QQmlDebugContextReference &b) const
{
QCOMPARE(a.debugId(), b.debugId());
QCOMPARE(a.name(), b.name());
recursiveCompareContexts(a.contexts()[i], b.contexts()[i]);
}
-void tst_QQmlEngineDebug::compareProperties(const QQmlDebugPropertyReference &a, const QQmlDebugPropertyReference &b) const
+void tst_QQmlEngineDebugService::compareProperties(const QQmlDebugPropertyReference &a, const QQmlDebugPropertyReference &b) const
{
QCOMPARE(a.objectDebugId(), b.objectDebugId());
QCOMPARE(a.name(), b.name());
QCOMPARE(a.hasNotifySignal(), b.hasNotifySignal());
}
-void tst_QQmlEngineDebug::initTestCase()
+void tst_QQmlEngineDebugService::initTestCase()
{
qRegisterMetaType<QQmlDebugWatch::State>();
qmlRegisterType<NonScriptProperty>("Test", 1, 0, "NonScriptPropertyElement");
QTRY_VERIFY(m_dbg->state() == QQmlEngineDebug::Enabled);
}
-void tst_QQmlEngineDebug::cleanupTestCase()
+void tst_QQmlEngineDebugService::cleanupTestCase()
{
delete m_dbg;
delete m_conn;
delete m_engine;
}
-void tst_QQmlEngineDebug::setMethodBody()
+void tst_QQmlEngineDebugService::setMethodBody()
{
QQmlDebugObjectReference obj = findRootObject(2);
}
}
-void tst_QQmlEngineDebug::watch_property()
+void tst_QQmlEngineDebugService::watch_property()
{
QQmlDebugObjectReference obj = findRootObject();
QQmlDebugPropertyReference prop = findProperty(obj.properties(), "width");
QCOMPARE(spy.at(0).at(1).value<QVariant>(), qVariantFromValue(origWidth*2));
}
-void tst_QQmlEngineDebug::watch_object()
+void tst_QQmlEngineDebugService::watch_object()
{
QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
waitForQuery(q_engines);
QCOMPARE(newHeight, origHeight * 2);
}
-void tst_QQmlEngineDebug::watch_expression()
+void tst_QQmlEngineDebugService::watch_expression()
{
QFETCH(QString, expr);
QFETCH(int, increment);
}
}
-void tst_QQmlEngineDebug::watch_expression_data()
+void tst_QQmlEngineDebugService::watch_expression_data()
{
QTest::addColumn<QString>("expr");
QTest::addColumn<int>("increment");
QTest::newRow("width+10") << "width + 10" << 10 << 5;
}
-void tst_QQmlEngineDebug::watch_context()
+void tst_QQmlEngineDebugService::watch_context()
{
QQmlDebugContextReference c;
QTest::ignoreMessage(QtWarningMsg, "QQmlEngineDebug::addWatch(): Not implemented");
QVERIFY(!m_dbg->addWatch(c, QString(), this));
}
-void tst_QQmlEngineDebug::watch_file()
+void tst_QQmlEngineDebugService::watch_file()
{
QQmlDebugFileReference f;
QTest::ignoreMessage(QtWarningMsg, "QQmlEngineDebug::addWatch(): Not implemented");
QVERIFY(!m_dbg->addWatch(f, this));
}
-void tst_QQmlEngineDebug::queryAvailableEngines()
+void tst_QQmlEngineDebugService::queryAvailableEngines()
{
QQmlDebugEnginesQuery *q_engines;
m_dbg = new QQmlEngineDebug(m_conn, this);
}
-void tst_QQmlEngineDebug::queryRootContexts()
+void tst_QQmlEngineDebugService::queryRootContexts()
{
QQmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
waitForQuery(q_engines);
m_dbg = new QQmlEngineDebug(m_conn, this);
}
-void tst_QQmlEngineDebug::queryObject()
+void tst_QQmlEngineDebugService::queryObject()
{
QFETCH(bool, recursive);
}
}
-void tst_QQmlEngineDebug::queryObject_data()
+void tst_QQmlEngineDebugService::queryObject_data()
{
QTest::addColumn<bool>("recursive");
QTest::newRow("recursive") << true;
}
-void tst_QQmlEngineDebug::queryExpressionResult()
+void tst_QQmlEngineDebugService::queryExpressionResult()
{
QFETCH(QString, expr);
QFETCH(QVariant, result);
m_dbg = new QQmlEngineDebug(m_conn, this);
}
-void tst_QQmlEngineDebug::queryExpressionResult_data()
+void tst_QQmlEngineDebugService::queryExpressionResult_data()
{
QTest::addColumn<QString>("expr");
QTest::addColumn<QVariant>("result");
QTest::newRow("varObjMap") << "varObjMap" << qVariantFromValue(map);
}
-void tst_QQmlEngineDebug::tst_QQmlDebugFileReference()
+void tst_QQmlEngineDebugService::tst_QQmlDebugFileReference()
{
QQmlDebugFileReference ref;
QVERIFY(ref.url().isEmpty());
}
}
-void tst_QQmlEngineDebug::tst_QQmlDebugEngineReference()
+void tst_QQmlEngineDebugService::tst_QQmlDebugEngineReference()
{
QQmlDebugEngineReference ref;
QCOMPARE(ref.debugId(), -1);
}
}
-void tst_QQmlEngineDebug::tst_QQmlDebugObjectReference()
+void tst_QQmlEngineDebugService::tst_QQmlDebugObjectReference()
{
QQmlDebugObjectReference ref;
QCOMPARE(ref.debugId(), -1);
recursiveCompareObjects(r, ref);
}
-void tst_QQmlEngineDebug::tst_QQmlDebugContextReference()
+void tst_QQmlEngineDebugService::tst_QQmlDebugContextReference()
{
QQmlDebugContextReference ref;
QCOMPARE(ref.debugId(), -1);
recursiveCompareContexts(r, ref);
}
-void tst_QQmlEngineDebug::tst_QQmlDebugPropertyReference()
+void tst_QQmlEngineDebugService::tst_QQmlDebugPropertyReference()
{
QQmlDebugObjectReference rootObject = findRootObject();
QQmlDebugObjectQuery *query = m_dbg->queryObject(rootObject, this);
compareProperties(r, ref);
}
-void tst_QQmlEngineDebug::setBindingForObject()
+void tst_QQmlEngineDebugService::setBindingForObject()
{
QQmlDebugObjectReference rootObject = findRootObject();
QVERIFY(rootObject.debugId() != -1);
QCOMPARE(onEnteredRef.value(), QVariant("{console.log('hello, world') }"));
}
-void tst_QQmlEngineDebug::setBindingInStates()
+void tst_QQmlEngineDebugService::setBindingInStates()
{
// Check if changing bindings of propertychanges works
QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 300);
}
-void tst_QQmlEngineDebug::queryObjectTree()
+void tst_QQmlEngineDebugService::queryObjectTree()
{
const int sourceIndex = 3;
_argv[_argc - 1] = arg;
QGuiApplication app(_argc, _argv);
- tst_QQmlEngineDebug tc;
+ tst_QQmlEngineDebugService tc;
return QTest::qExec(&tc, _argc, _argv);
delete _argv;
}
-#include "tst_qqmlenginedebug.moc"
+#include "tst_qqmlenginedebugservice.moc"
TARGET = tst_qqmlinspector
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
-SOURCES += tst_qqmlinspector.cpp \
- ../shared/debugutil.cpp
+SOURCES += tst_qqmlinspector.cpp
+
+INCLUDEPATH += ../shared
+include(../shared/debugutil.pri)
DEFINES += SRCDIR=\\\"$$PWD\\\"
CONFIG += parallel_test declarative_debug
TARGET = tst_qqmlprofilerservice
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
+SOURCES += tst_qqmlprofilerservice.cpp
-SOURCES += tst_qqmlprofilerservice.cpp \
- ../shared/debugutil.cpp
-OTHER_FILES += data/test.qml
+INCLUDEPATH += ../shared
+include(../../../shared/util.pri)
+include(../shared/debugutil.pri)
-include (../../../shared/util.pri)
+OTHER_FILES += data/test.qml
CONFIG += parallel_test declarative_debug
#include <QLibraryInfo>
#include "QtQml/private/qqmlprofilerservice_p.h"
-#include "../shared/debugutil_p.h"
+#include "debugutil_p.h"
+#include "qqmldebugclient.h"
#include "../../../shared/util.h"
#define PORT 13773
TARGET = tst_qv8profilerservice
macx:CONFIG -= app_bundle
-HEADERS += ../shared/debugutil_p.h
+SOURCES += tst_qv8profilerservice.cpp
-SOURCES += tst_qv8profilerservice.cpp \
- ../shared/debugutil.cpp
-
-include (../../../shared/util.pri)
+INCLUDEPATH += ../shared
+include(../../../shared/util.pri)
+include(../shared/debugutil.pri)
OTHER_FILES += data/test.qml
#include <QLibraryInfo>
#include "QtQml/private/qv8profilerservice_p.h"
-#include "../shared/debugutil_p.h"
+#include "debugutil_p.h"
+#include "qqmldebugclient.h"
#include "../../../shared/util.h"
#define PORT 13774
#include <QEventLoop>
#include <QTimer>
-#include <private/qqmldebugclient_p.h>
-#include <private/qqmldebugservice_p.h>
-
bool QQmlDebugTest::waitForSignal(QObject *receiver, const char *member, int timeout) {
QEventLoop loop;
QTimer timer;
--- /dev/null
+QT += core-private
+
+HEADERS += $$PWD/debugutil_p.h \
+ $$PWD/qqmldebugclient.h \
+ $$PWD/qqmlenginedebug_p.h
+SOURCES += $$PWD/debugutil.cpp \
+ $$PWD/qqmldebugclient.cpp \
+ $$PWD/qqmlenginedebug.cpp
+
#include <QtQml/qqmlengine.h>
-#include <private/qqmldebugclient_p.h>
+#include "qqmldebugclient.h"
#include <private/qqmldebugservice_p.h>
class QQmlDebugTest
**
****************************************************************************/
-#include "qqmldebugclient_p.h"
+#include "qqmldebugclient.h"
-#include "qpacketprotocol_p.h"
+#include <private/qpacketprotocol_p.h>
#include <QtCore/qdebug.h>
#include <QtCore/qstringlist.h>
#include <QtNetwork/qnetworkproxy.h>
-#include <private/qobject_p.h>
-
-QT_BEGIN_NAMESPACE
-
const int protocolVersion = 1;
const QString serverId = QLatin1String("QDeclarativeDebugServer");
const QString clientId = QLatin1String("QDeclarativeDebugClient");
-class QQmlDebugClientPrivate : public QObjectPrivate
+class QQmlDebugClientPrivate
{
- Q_DECLARE_PUBLIC(QQmlDebugClient)
public:
QQmlDebugClientPrivate();
{
QHash<QString, QQmlDebugClient*>::iterator iter = d->plugins.begin();
for (; iter != d->plugins.end(); ++iter) {
- iter.value()->d_func()->connection = 0;
+ iter.value()->d->connection = 0;
iter.value()->stateChanged(QQmlDebugClient::NotConnected);
}
}
QQmlDebugClient::QQmlDebugClient(const QString &name,
QQmlDebugConnection *parent)
- : QObject(*(new QQmlDebugClientPrivate), parent)
+ : QObject(parent),
+ d(new QQmlDebugClientPrivate)
{
- Q_D(QQmlDebugClient);
d->name = name;
d->connection = parent;
QQmlDebugClient::~QQmlDebugClient()
{
- Q_D(QQmlDebugClient);
if (d->connection && d->connection->d) {
d->connection->d->plugins.remove(d->name);
d->connection->d->advertisePlugins();
}
+ delete d;
}
QString QQmlDebugClient::name() const
{
- Q_D(const QQmlDebugClient);
return d->name;
}
float QQmlDebugClient::serviceVersion() const
{
- Q_D(const QQmlDebugClient);
if (d->connection->d->serverPlugins.contains(d->name))
return d->connection->d->serverPlugins.value(d->name);
return -1;
QQmlDebugClient::State QQmlDebugClient::state() const
{
- Q_D(const QQmlDebugClient);
if (!d->connection
|| !d->connection->isConnected()
|| !d->connection->d->gotHello)
void QQmlDebugClient::sendMessage(const QByteArray &message)
{
- Q_D(QQmlDebugClient);
if (state() != Enabled)
return;
{
}
-QT_END_NAMESPACE
-
#include <qqmldebugclient.moc>
#ifndef QQMLDEBUGCLIENT_H
#define QQMLDEBUGCLIENT_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 <QtNetwork/qtcpsocket.h>
#include <private/qtqmlglobal_p.h>
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
class QQmlDebugConnectionPrivate;
class Q_QML_PRIVATE_EXPORT QQmlDebugConnection : public QIODevice
{
virtual void messageReceived(const QByteArray &);
private:
+ QQmlDebugClientPrivate *d;
friend class QQmlDebugConnection;
friend class QQmlDebugConnectionPrivate;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
#endif // QQMLDEBUGCLIENT_H
#include "qqmlenginedebug_p.h"
-#include "qqmldebugclient_p.h"
+#include "qqmldebugclient.h"
-#include "qqmlenginedebugservice_p.h"
+#include <private/qqmlenginedebugservice_p.h>
-#include <private/qobject_p.h>
-
-QT_BEGIN_NAMESPACE
+#include <QtCore/private/qobject_p.h>
class QQmlEngineDebugClient : public QQmlDebugClient
{
return m_hasNotifySignal;
}
-QT_END_NAMESPACE
-
#include <private/qtqmlglobal_p.h>
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
class QQmlDebugConnection;
class QQmlDebugWatch;
class QQmlDebugPropertyWatch;
QVariant m_result;
};
-QT_END_NAMESPACE
-
Q_DECLARE_METATYPE(QQmlDebugEngineReference)
Q_DECLARE_METATYPE(QQmlDebugObjectReference)
Q_DECLARE_METATYPE(QQmlDebugContextReference)
Q_DECLARE_METATYPE(QQmlDebugPropertyReference)
-QT_END_HEADER
-
#endif // QQMLENGINEDEBUG_H
#include "profiledata.h"
-#include <QtQml/private/qqmldebugclient_p.h>
+#include "qqmldebugclient.h"
#include <QtQml/private/qqmlprofilerservice_p.h>
class ProfileClientPrivate;
TARGET = qmlprofiler
DESTDIR = $$QT.qml.bins
-QT += qml qml-private network
+QT += qml qml-private network core-private
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
qmlprofilerapplication.cpp \
commandlistener.cpp \
profileclient.cpp \
- profiledata.cpp
+ profiledata.cpp \
+ qqmldebugclient.cpp
HEADERS += \
qmlprofilerapplication.h \
commandlistener.h \
constants.h \
profileclient.h \
- profiledata.h
+ profiledata.h \
+ qqmldebugclient.h
**
****************************************************************************/
-#include "qqmldebugclient_p.h"
+#include "qqmldebugclient.h"
-#include "qpacketprotocol_p.h"
+#include <private/qpacketprotocol_p.h>
#include <QtCore/qdebug.h>
#include <QtCore/qstringlist.h>
#include <QtNetwork/qnetworkproxy.h>
-#include <private/qobject_p.h>
-
-QT_BEGIN_NAMESPACE
-
const int protocolVersion = 1;
const QString serverId = QLatin1String("QDeclarativeDebugServer");
const QString clientId = QLatin1String("QDeclarativeDebugClient");
-class QQmlDebugClientPrivate : public QObjectPrivate
+class QQmlDebugClientPrivate
{
- Q_DECLARE_PUBLIC(QQmlDebugClient)
public:
QQmlDebugClientPrivate();
{
QHash<QString, QQmlDebugClient*>::iterator iter = d->plugins.begin();
for (; iter != d->plugins.end(); ++iter) {
- iter.value()->d_func()->connection = 0;
+ iter.value()->d->connection = 0;
iter.value()->stateChanged(QQmlDebugClient::NotConnected);
}
}
QQmlDebugClient::QQmlDebugClient(const QString &name,
QQmlDebugConnection *parent)
- : QObject(*(new QQmlDebugClientPrivate), parent)
+ : QObject(parent),
+ d(new QQmlDebugClientPrivate)
{
- Q_D(QQmlDebugClient);
d->name = name;
d->connection = parent;
QQmlDebugClient::~QQmlDebugClient()
{
- Q_D(QQmlDebugClient);
if (d->connection && d->connection->d) {
d->connection->d->plugins.remove(d->name);
d->connection->d->advertisePlugins();
}
+ delete d;
}
QString QQmlDebugClient::name() const
{
- Q_D(const QQmlDebugClient);
return d->name;
}
float QQmlDebugClient::serviceVersion() const
{
- Q_D(const QQmlDebugClient);
if (d->connection->d->serverPlugins.contains(d->name))
return d->connection->d->serverPlugins.value(d->name);
return -1;
QQmlDebugClient::State QQmlDebugClient::state() const
{
- Q_D(const QQmlDebugClient);
if (!d->connection
|| !d->connection->isConnected()
|| !d->connection->d->gotHello)
void QQmlDebugClient::sendMessage(const QByteArray &message)
{
- Q_D(QQmlDebugClient);
if (state() != Enabled)
return;
{
}
-QT_END_NAMESPACE
-
#include <qqmldebugclient.moc>
#ifndef QQMLDEBUGCLIENT_H
#define QQMLDEBUGCLIENT_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 <QtNetwork/qtcpsocket.h>
-#include <private/qtqmlglobal_p.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
class QQmlDebugConnectionPrivate;
-class Q_QML_PRIVATE_EXPORT QQmlDebugConnection : public QIODevice
+class QQmlDebugConnection : public QIODevice
{
Q_OBJECT
Q_DISABLE_COPY(QQmlDebugConnection)
};
class QQmlDebugClientPrivate;
-class Q_QML_PRIVATE_EXPORT QQmlDebugClient : public QObject
+class QQmlDebugClient : public QObject
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QQmlDebugClient)
Q_DISABLE_COPY(QQmlDebugClient)
public:
virtual void messageReceived(const QByteArray &);
private:
+ QQmlDebugClientPrivate *d;
friend class QQmlDebugConnection;
friend class QQmlDebugConnectionPrivate;
};
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
#endif // QQMLDEBUGCLIENT_H