summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-05-20 14:02:29 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-05-20 14:17:50 +0100
commit52aefcbe795a93207c2cf3a19b8ff09f81346372 (patch)
tree15b94271f4430f6f2464e2e235038cc7822ef1f2 /gui
parent46b887754299d493f52653eba3c97b58be8855e1 (diff)
gui: Hide QDataStream.
Diffstat (limited to 'gui')
-rw-r--r--gui/qubjson.cpp3
-rw-r--r--gui/qubjson.h4
-rw-r--r--gui/retracer.cpp3
3 files changed, 5 insertions, 5 deletions
diff --git a/gui/qubjson.cpp b/gui/qubjson.cpp
index a0652cd2..3cff8d60 100644
--- a/gui/qubjson.cpp
+++ b/gui/qubjson.cpp
@@ -239,8 +239,9 @@ readVariant(QDataStream &stream, Marker type)
-QVariantMap decodeUBJSONObject(QDataStream &stream)
+QVariantMap decodeUBJSONObject(QIODevice *io)
{
+ QDataStream stream(io);
stream.setByteOrder(QDataStream::BigEndian);
Marker marker = readMarker(stream);
Q_ASSERT(marker == MARKER_OBJECT_BEGIN);
diff --git a/gui/qubjson.h b/gui/qubjson.h
index 2e3e4927..a5e38e50 100644
--- a/gui/qubjson.h
+++ b/gui/qubjson.h
@@ -28,7 +28,7 @@
#include <QVariantMap>
-#include <QDataStream>
+class QIODevice;
-QVariantMap decodeUBJSONObject(QDataStream &stream);
+QVariantMap decodeUBJSONObject(QIODevice *io);
diff --git a/gui/retracer.cpp b/gui/retracer.cpp
index 0f33b181..103cdeb9 100644
--- a/gui/retracer.cpp
+++ b/gui/retracer.cpp
@@ -446,8 +446,7 @@ void Retracer::run()
BlockingIODevice io(&process);
if (m_captureState) {
- QDataStream datastream(&io);
- parsedJson = decodeUBJSONObject(datastream);
+ parsedJson = decodeUBJSONObject(&io);
process.waitForFinished(-1);
} else if (m_captureThumbnails) {
/*