summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-05-21 21:41:50 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-05-27 10:10:17 +0100
commit08fdb7b628e35976770bd5848a7e0e8cc93b1971 (patch)
treedd9c103453efba1c587218cc7943e9a3028415e7 /gui
parent84f5e9ad2dd7d3cfc78d42a1e1923d671f41f2bf (diff)
gui: Allow values as UBJSON root.
Diffstat (limited to 'gui')
-rw-r--r--gui/qubjson.cpp6
-rw-r--r--gui/qubjson.h2
-rw-r--r--gui/retracer.cpp2
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) {
/*