QmlProfiler: Use QmlDebugStream for communication with server

The server does the equivalent and using different data stream versions
for encoding and decoding will lead to problems, eventually.

Change-Id: I9e97525b4ba7f40b65b914c7f282e008435772a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-09-18 16:51:01 +02:00
parent beb424d209
commit 90279e6d2b

View File

@@ -75,7 +75,7 @@ static const int GAP_TIME = 150;
void QmlProfilerTraceClientPrivate::sendRecordingStatus(int engineId) void QmlProfilerTraceClientPrivate::sendRecordingStatus(int engineId)
{ {
QByteArray ba; QByteArray ba;
QDataStream stream(&ba, QIODevice::WriteOnly); QmlDebugStream stream(&ba, QIODevice::WriteOnly);
stream << recording << engineId; // engineId -1 is OK. It means "all of them" stream << recording << engineId; // engineId -1 is OK. It means "all of them"
if (recording) if (recording)
stream << requestedFeatures << flushInterval; stream << requestedFeatures << flushInterval;
@@ -187,7 +187,7 @@ void QmlProfilerTraceClient::stateChanged(State /*status*/)
void QmlProfilerTraceClient::messageReceived(const QByteArray &data) void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
{ {
QByteArray rwData = data; QByteArray rwData = data;
QDataStream stream(&rwData, QIODevice::ReadOnly); QmlDebugStream stream(&rwData, QIODevice::ReadOnly);
qint64 time; qint64 time;
int messageType; int messageType;