From b30c991f3fa5f196cfb7bf46eb784169c9b2eb74 Mon Sep 17 00:00:00 2001 From: Aleksi Suomalainen Date: Fri, 24 Oct 2014 16:29:04 +0000 Subject: Fixes to Qt 5.2 --- daemon/watchconnector.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'daemon/watchconnector.cpp') diff --git a/daemon/watchconnector.cpp b/daemon/watchconnector.cpp index 91c5217..d91d183 100644 --- a/daemon/watchconnector.cpp +++ b/daemon/watchconnector.cpp @@ -66,8 +66,11 @@ void WatchConnector::handleWatch(const QString &name, const QString &address) if (emit_name) emit nameChanged(); logger()->debug() << "Creating socket"; +#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) socket = new QBluetoothSocket(QBluetoothSocket::RfcommSocket); - +#else + socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol); +#endif connect(socket, SIGNAL(readyRead()), SLOT(onReadSocket())); connect(socket, SIGNAL(bytesWritten(qint64)), SLOT(onBytesWritten(qint64))); connect(socket, SIGNAL(connected()), SLOT(onConnected())); -- cgit v1.2.3