diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-05-21 21:41:50 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-05-27 10:10:17 +0100 |
commit | 08fdb7b628e35976770bd5848a7e0e8cc93b1971 (patch) | |
tree | dd9c103453efba1c587218cc7943e9a3028415e7 /gui | |
parent | 84f5e9ad2dd7d3cfc78d42a1e1923d671f41f2bf (diff) |
gui: Allow values as UBJSON root.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/qubjson.cpp | 6 | ||||
-rw-r--r-- | gui/qubjson.h | 2 | ||||
-rw-r--r-- | gui/retracer.cpp | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/gui/qubjson.cpp b/gui/qubjson.cpp index 2649a41a..ae3b7b15 100644 --- a/gui/qubjson.cpp +++ b/gui/qubjson.cpp @@ -267,13 +267,11 @@ readVariant(QDataStream &stream, Marker type) } -QVariantMap decodeUBJSONObject(QIODevice *io) +QVariant decodeUBJSONObject(QIODevice *io) { QDataStream stream(io); stream.setByteOrder(QDataStream::BigEndian); Marker marker = readMarker(stream); - Q_ASSERT(marker == MARKER_OBJECT_BEGIN); - Q_UNUSED(marker); - return readObject(stream); + return readVariant(stream, marker); } diff --git a/gui/qubjson.h b/gui/qubjson.h index a5e38e50..7ca043d4 100644 --- a/gui/qubjson.h +++ b/gui/qubjson.h @@ -31,4 +31,4 @@ class QIODevice; -QVariantMap decodeUBJSONObject(QIODevice *io); +QVariant decodeUBJSONObject(QIODevice *io); diff --git a/gui/retracer.cpp b/gui/retracer.cpp index 103cdeb9..02f01454 100644 --- a/gui/retracer.cpp +++ b/gui/retracer.cpp @@ -446,7 +446,7 @@ void Retracer::run() BlockingIODevice io(&process); if (m_captureState) { - parsedJson = decodeUBJSONObject(&io); + parsedJson = decodeUBJSONObject(&io).toMap(); process.waitForFinished(-1); } else if (m_captureThumbnails) { /* |