From 4ae204db158a82a663565d9377d6afc7af39d1ce Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 12 May 2014 15:38:27 +0200 Subject: qt5 fixes --- gatoaddress.cpp | 2 +- gatoattclient.cpp | 1 + gatoperipheral.cpp | 2 +- gatouuid.cpp | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gatoaddress.cpp b/gatoaddress.cpp index e29190b..c2eeeec 100644 --- a/gatoaddress.cpp +++ b/gatoaddress.cpp @@ -96,7 +96,7 @@ QString GatoAddress::toString() const { char addr[18]; ba2str(&d->addr.bd, addr); - return QString::fromAscii(addr); + return QString::fromLatin1(addr); } bool operator==(const GatoAddress &a, const GatoAddress &b) diff --git a/gatoattclient.cpp b/gatoattclient.cpp index 4af69ce..033794f 100644 --- a/gatoattclient.cpp +++ b/gatoattclient.cpp @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include "gatoattclient.h" diff --git a/gatoperipheral.cpp b/gatoperipheral.cpp index 0228471..c4339ec 100644 --- a/gatoperipheral.cpp +++ b/gatoperipheral.cpp @@ -452,7 +452,7 @@ void GatoPeripheralPrivate::parseName(bool complete, quint8 data[], int len) { Q_Q(GatoPeripheral); if (complete || !complete_name) { - name = QString::fromAscii(reinterpret_cast(data), len); + name = QString::fromUtf8(reinterpret_cast(data), len); complete_name = complete; emit q->nameChanged(); } diff --git a/gatouuid.cpp b/gatouuid.cpp index 91b9e32..4a9625a 100644 --- a/gatouuid.cpp +++ b/gatouuid.cpp @@ -19,8 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include #include +#include #include "gatouuid.h" -- cgit v1.2.3