summaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger/qpacketprotocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/debugger/qpacketprotocol.cpp')
-rw-r--r--src/declarative/debugger/qpacketprotocol.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp
index 0adfb76..15a14cf 100644
--- a/src/declarative/debugger/qpacketprotocol.cpp
+++ b/src/declarative/debugger/qpacketprotocol.cpp
@@ -407,6 +407,7 @@ QPacket::QPacket()
buf = new QBuffer(&b);
buf->open(QIODevice::WriteOnly);
setDevice(buf);
+ setVersion(QDataStream::Qt_4_7);
}
/*!
@@ -452,6 +453,14 @@ bool QPacket::isEmpty() const
}
/*!
+ Returns raw packet data.
+ */
+QByteArray QPacket::data() const
+{
+ return b;
+}
+
+/*!
Clears data in the packet. This is useful for reusing one writable packet.
For example
\code