summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bluetoothgpsserver.cpp2
-rw-r--r--bluetoothgpsserver.h6
-rw-r--r--nmeasource.cpp2
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 <QtBluetooth/QBluetoothSocket>
#include <QtBluetooth/QBluetoothServiceInfo>
-#include <QtBluetooth/QRfcommServer>
-
-QT_USE_NAMESPACE_BLUETOOTH
+#include <QtBluetooth/QBluetoothServer>
class NmeaSource;
@@ -34,7 +32,7 @@ private:
uint m_port;
NmeaSource* m_source;
QBluetoothServiceInfo m_service;
- QRfcommServer* m_server;
+ QBluetoothServer* m_server;
QList<QBluetoothSocket*> 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<QGeoSate
// 1 = Number of sentences for full data
.arg(nmsgs)
// 2 = Sentence number
- .arg(i)
+ .arg(i + 1)
// 3 = Total number of satellites in view
.arg(nsats)
// 4 - 14 = IDs of SVs used in position fix