aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qv8profilerservice.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-04-23 09:23:23 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-26 11:46:06 +0200
commit7f7cd79e29e634ddff55fe18b122ac85c5cfe4a0 (patch)
treec6914c9a28eaec0e07309cfdfd60b9da0388912b /src/qml/debugger/qv8profilerservice.cpp
parentc0f07d5707180856bb2705359d780a836653188c (diff)
QmlDebugging: Exchange supported QDataStream versions
Since the client and service needs to pack/unpack datastreams, they need to encode/decode using the lowest common QDataStream version. Change-Id: I3b4886fece59b24950ba618da07a0fefd41a5637 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/qml/debugger/qv8profilerservice.cpp')
-rw-r--r--src/qml/debugger/qv8profilerservice.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/debugger/qv8profilerservice.cpp b/src/qml/debugger/qv8profilerservice.cpp
index 5cddea755c..e75156ff76 100644
--- a/src/qml/debugger/qv8profilerservice.cpp
+++ b/src/qml/debugger/qv8profilerservice.cpp
@@ -61,7 +61,7 @@ public:
WriteResult WriteAsciiChunk(char *rawData, int size)
{
QByteArray data;
- QDataStream ds(&data, QIODevice::WriteOnly);
+ QQmlDebugStream ds(&data, QIODevice::WriteOnly);
ds << QV8ProfilerService::V8SnapshotChunk << QByteArray(rawData, size);
messages.append(data);
return kContinue;
@@ -74,7 +74,7 @@ QByteArray QV8ProfilerData::toByteArray() const
{
QByteArray data;
//### using QDataStream is relatively expensive
- QDataStream ds(&data, QIODevice::WriteOnly);
+ QQmlDebugStream ds(&data, QIODevice::WriteOnly);
ds << messageType << filename << functionname << lineNumber << totalTime << selfTime << treeLevel;
return data;
@@ -156,7 +156,7 @@ void QV8ProfilerService::messageReceived(const QByteArray &message)
{
Q_D(QV8ProfilerService);
- QDataStream ds(message);
+ QQmlDebugStream ds(message);
QByteArray command;
QByteArray option;
QByteArray title;
@@ -206,7 +206,7 @@ void QV8ProfilerService::startProfiling(const QString &title)
// indicate profiling started
QByteArray data;
- QDataStream ds(&data, QIODevice::WriteOnly);
+ QQmlDebugStream ds(&data, QIODevice::WriteOnly);
ds << (int)QV8ProfilerService::V8Started;
sendMessage(data);
@@ -231,7 +231,7 @@ void QV8ProfilerService::stopProfiling(const QString &title)
} else {
// indicate completion, even without data
QByteArray data;
- QDataStream ds(&data, QIODevice::WriteOnly);
+ QQmlDebugStream ds(&data, QIODevice::WriteOnly);
ds << (int)QV8ProfilerService::V8Complete;
sendMessage(data);
@@ -290,7 +290,7 @@ void QV8ProfilerServicePrivate::takeSnapshot(v8::HeapSnapshot::Type snapshotType
//indicate completion
QByteArray data;
- QDataStream ds(&data, QIODevice::WriteOnly);
+ QQmlDebugStream ds(&data, QIODevice::WriteOnly);
ds << (int)QV8ProfilerService::V8SnapshotComplete;
messages.append(data);
@@ -308,7 +308,7 @@ void QV8ProfilerServicePrivate::sendMessages()
//indicate completion
QByteArray data;
- QDataStream ds(&data, QIODevice::WriteOnly);
+ QQmlDebugStream ds(&data, QIODevice::WriteOnly);
ds << (int)QV8ProfilerService::V8Complete;
messages.append(data);