summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-05-21 16:12:55 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-05-21 16:12:55 +0100
commitc9c987dc3e0e369a0a02bcf6cdc8d45dbe7ce770 (patch)
treeaa8c790bf08bc324a83249eabcb70b6fb4d88a33 /gui
parente2e4c36b358bc31cb03e934084cacbff1966c39d (diff)
gui: Fix UBJSON string decoding.
Diffstat (limited to 'gui')
-rw-r--r--gui/qubjson.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/gui/qubjson.cpp b/gui/qubjson.cpp
index 01b653c7..c36e0659 100644
--- a/gui/qubjson.cpp
+++ b/gui/qubjson.cpp
@@ -28,7 +28,6 @@
#include <QDebug>
#include <QVariant>
-#include <QJsonArray>
#include <QDataStream>
#include "ubjson.hpp"
@@ -137,8 +136,8 @@ readString(QDataStream &stream)
size_t size = readSize(stream);
char *buf = new char [size];
stream.readRawData(buf, size);
- QString str = QString::fromLocal8Bit(buf, size);
- free(buf);
+ QString str = QString::fromUtf8(buf, size);
+ delete [] buf;
return str;
}