summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-05-12 15:38:27 +0200
committerJavier <dev.git@javispedro.com>2014-05-12 15:38:27 +0200
commit4ae204db158a82a663565d9377d6afc7af39d1ce (patch)
tree2017adea4205e44ac992776020a4c78420d2b975
parentff9fd605200825322beed8f86df765b70370b9d3 (diff)
downloadlibgato-4ae204db158a82a663565d9377d6afc7af39d1ce.tar.gz
libgato-4ae204db158a82a663565d9377d6afc7af39d1ce.zip
qt5 fixes
-rw-r--r--gatoaddress.cpp2
-rw-r--r--gatoattclient.cpp1
-rw-r--r--gatoperipheral.cpp2
-rw-r--r--gatouuid.cpp3
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 <QtCore/QDataStream>
#include <QtCore/QDebug>
#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<char*>(data), len);
+ name = QString::fromUtf8(reinterpret_cast<char*>(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 <QtCore/QDebug>
+#include <QtCore/QDataStream>
#include <QtCore/QHash>
+#include <QtCore/QDebug>
#include "gatouuid.h"