From 52aefcbe795a93207c2cf3a19b8ff09f81346372 Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Wed, 20 May 2015 14:02:29 +0100 Subject: gui: Hide QDataStream. --- gui/qubjson.cpp | 3 ++- gui/qubjson.h | 4 ++-- gui/retracer.cpp | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'gui') 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 -#include +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) { /* -- cgit v1.2.3