From c9c987dc3e0e369a0a02bcf6cdc8d45dbe7ce770 Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Thu, 21 May 2015 16:12:55 +0100 Subject: gui: Fix UBJSON string decoding. --- gui/qubjson.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gui') 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 #include -#include #include #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; } -- cgit v1.2.3