From 0b67dd7e132d7d618fa538e8c4a275c874543342 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 3 Nov 2015 14:32:25 +0100 Subject: 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 --- .../auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/qml/debugger/qqmlprofilerservice') diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index 199da00e0c..3a9666b8fe 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -99,7 +99,7 @@ private: void complete(); void unknownEvent(QQmlProfilerDefinitions::Message messageType, qint64 time, int detailType); - void unknownData(QDataStream &stream); + void unknownData(QPacket &stream); }; void QQmlProfilerTestClient::traceStarted(qint64 time, int engineId) @@ -230,7 +230,7 @@ void QQmlProfilerTestClient::unknownEvent(QQmlProfilerDefinitions::Message messa .arg(messageType).arg(detailType).arg(time))); } -void QQmlProfilerTestClient::unknownData(QDataStream &stream) +void QQmlProfilerTestClient::unknownData(QPacket &stream) { QFAIL(qPrintable(QString::fromLatin1("%1 bytes of extra data after receiving message.") .arg(stream.device()->bytesAvailable()))); -- cgit v1.2.3