From aebbb506b01d29d7e963c4d63aa52a21094dac4e Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 13 Dec 2015 04:15:19 +0100 Subject: port to Qt 5.2 --- bluetoothgpsserver.cpp | 2 +- bluetoothgpsserver.h | 6 ++---- nmeasource.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bluetoothgpsserver.cpp b/bluetoothgpsserver.cpp index efbddf0..fb46e91 100644 --- a/bluetoothgpsserver.cpp +++ b/bluetoothgpsserver.cpp @@ -20,7 +20,7 @@ void BluetoothGpsServer::start() return; } - m_server = new QRfcommServer(this); + m_server = new QBluetoothServer(QBluetoothServiceInfo::RfcommProtocol, this); connect(m_server, SIGNAL(newConnection()), this, SLOT(acceptConnection())); if (!m_server->listen(QBluetoothAddress(), m_port)) { qWarning() << "Failed to start Bluetooth listener socket"; diff --git a/bluetoothgpsserver.h b/bluetoothgpsserver.h index db5c25b..50ee1de 100644 --- a/bluetoothgpsserver.h +++ b/bluetoothgpsserver.h @@ -6,9 +6,7 @@ #include #include -#include - -QT_USE_NAMESPACE_BLUETOOTH +#include class NmeaSource; @@ -34,7 +32,7 @@ private: uint m_port; NmeaSource* m_source; QBluetoothServiceInfo m_service; - QRfcommServer* m_server; + QBluetoothServer* m_server; QList m_clients; }; diff --git a/nmeasource.cpp b/nmeasource.cpp index e9bb222..e9e93ef 100644 --- a/nmeasource.cpp +++ b/nmeasource.cpp @@ -565,7 +565,7 @@ void NmeaSource::generateGPGSV(const QGeoPositionInfo& pos, const QList