diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-11-03 14:32:25 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-11-17 18:42:07 +0000 |
commit | 0b67dd7e132d7d618fa538e8c4a275c874543342 (patch) | |
tree | 3c6c7cdf8fbae8c6a7d0d333d96c22d130413980 /src/plugins/qmltooling/qmldbg_quickprofiler | |
parent | e010b64d38cb8533d779ac0fe8d609f00a6793e7 (diff) |
QmlDebug: Restructure QPacket and QPacketProtocol
We cannot use the same data stream version for the client and server
versions of QPacket and QPacketProtocol should not deal with QPackets
but with simple byte arrays because the underlying QDataStream is hard
to copy.
The new QQmlDebugPacket picks its data stream version from
QQmlDebugConnector now, which adjusts it when connecting. As there can
only ever be one QQmlDebugConnector, we can keep the version static.
The clients need to query the connection for the correct version. We
may connect to several different servers sequentially or we may have a
server running while using a client, and we don't want to confuse the
versions between those.
With this in place, all remaining occurrences of QDataStream are
replaced with QPacket or QQmlDebugPacket.
Change-Id: I3f6ba73fcbfad5e8df917c5feb9308116738a614
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmltooling/qmldbg_quickprofiler')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro | 5 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro b/src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro index 9cc51c5e70..6ca0a184ca 100644 --- a/src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro +++ b/src/plugins/qmltooling/qmldbg_quickprofiler/qmldbg_quickprofiler.pro @@ -1,5 +1,5 @@ TARGET = qmldbg_quickprofiler -QT += qml-private quick-private core-private +QT += qml-private quick-private core-private packetprotocol-private PLUGIN_TYPE = qmltooling PLUGIN_CLASS_NAME = QQuickProfilerAdapterFactory @@ -13,7 +13,8 @@ SOURCES += \ HEADERS += \ $$PWD/qquickprofileradapter.h \ - $$PWD/qquickprofileradapterfactory.h + $$PWD/qquickprofileradapterfactory.h \ + $$PWD/../shared/qqmldebugpacket.h OTHER_FILES += \ qquickprofileradapter.json diff --git a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp index 053db9aa45..8438a6fb3a 100644 --- a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp +++ b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp @@ -32,9 +32,9 @@ ****************************************************************************/ #include "qquickprofileradapter.h" +#include "qqmldebugpacket.h" #include <QCoreApplication> #include <private/qqmldebugserviceinterfaces_p.h> -#include <private/qpacket_p.h> #include <private/qquickprofiler_p.h> QT_BEGIN_NAMESPACE @@ -86,7 +86,7 @@ static void qQuickProfilerDataToByteArrays(const QQuickProfilerData &data, continue; //### using QDataStream is relatively expensive - QPacket ds; + QQmlDebugPacket ds; ds << data.time << decodedMessageType << decodedDetailType; switch (decodedMessageType) { |