summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorAleksi Suomalainen <suomalainen.aleksi@gmail.com>2014-10-24 16:29:04 +0000
committerAleksi Suomalainen <suomalainen.aleksi@gmail.com>2014-10-24 18:33:52 +0000
commitb30c991f3fa5f196cfb7bf46eb784169c9b2eb74 (patch)
tree3198f44da97017a63df1e783013a16fa2c5488fe /daemon
parent31a206e93e2266f3dcc0e1c2c43ab92e5ae7bd9c (diff)
Fixes to Qt 5.2
Diffstat (limited to 'daemon')
-rw-r--r--daemon/watchconnector.cpp5
-rw-r--r--daemon/watchconnector.h2
2 files changed, 6 insertions, 1 deletions
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()));
diff --git a/daemon/watchconnector.h b/daemon/watchconnector.h
index beb1992..b64e31b 100644
--- a/daemon/watchconnector.h
+++ b/daemon/watchconnector.h
@@ -39,7 +39,9 @@
#include <QBluetoothServiceInfo>
#include <Log4Qt/Logger>
+#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
using namespace QtBluetooth;
+#endif
namespace watch
{