summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/qt-ble.cpp2
-rw-r--r--core/qtserialbluetooth.cpp22
2 files changed, 12 insertions, 12 deletions
diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp
index 357758580..04a9180b2 100644
--- a/core/qt-ble.cpp
+++ b/core/qt-ble.cpp
@@ -642,7 +642,7 @@ dc_status_t qt_ble_open(void **io, dc_context_t *, const char *devaddr, device_d
QLowEnergyDescriptor d = l.first();
for (const QLowEnergyDescriptor &tmp: l) {
- if (tmp.type() == QBluetoothUuid::ClientCharacteristicConfiguration) {
+ if (tmp.type() == QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration) {
d = tmp;
break;
}
diff --git a/core/qtserialbluetooth.cpp b/core/qtserialbluetooth.cpp
index 1dd57c592..f2242f899 100644
--- a/core/qtserialbluetooth.cpp
+++ b/core/qtserialbluetooth.cpp
@@ -63,7 +63,7 @@ static dc_status_t qt_serial_open(qt_serial_t **io, dc_context_t*, const char* d
#if defined(Q_OS_ANDROID)
QBluetoothUuid uuid = QBluetoothUuid(QUuid("{00001101-0000-1000-8000-00805f9b34fb}"));
qDebug() << "connecting to Uuid" << uuid;
- serial_port->socket->setPreferredSecurityFlags(QBluetooth::NoSecurity);
+ serial_port->socket->setPreferredSecurityFlags(QBluetooth::Security::NoSecurity);
serial_port->socket->connectToService(remoteDeviceAddress, uuid, QIODevice::ReadWrite | QIODevice::Unbuffered);
#else
QBluetoothLocalDevice dev;
@@ -74,15 +74,15 @@ static dc_status_t qt_serial_open(qt_serial_t **io, dc_context_t*, const char* d
timer.start(msec);
loop.exec();
- if (serial_port->socket->state() == QBluetoothSocket::ConnectingState ||
- serial_port->socket->state() == QBluetoothSocket::ServiceLookupState) {
+ if (serial_port->socket->state() == QBluetoothSocket::SocketState::ConnectingState ||
+ serial_port->socket->state() == QBluetoothSocket::SocketState::ServiceLookupState) {
// It seems that the connection step took more than expected. Wait another 20 seconds.
qDebug() << "The connection step took more than expected. Wait another 20 seconds";
timer.start(4 * msec);
loop.exec();
}
- if (serial_port->socket->state() != QBluetoothSocket::ConnectedState) {
+ if (serial_port->socket->state() != QBluetoothSocket::SocketState::ConnectedState) {
// Get the latest error and try to match it with one from libdivecomputer
QBluetoothSocket::SocketError err = serial_port->socket->error();
@@ -90,14 +90,14 @@ static dc_status_t qt_serial_open(qt_serial_t **io, dc_context_t*, const char* d
free (serial_port);
switch(err) {
- case QBluetoothSocket::HostNotFoundError:
- case QBluetoothSocket::ServiceNotFoundError:
+ case QBluetoothSocket::SocketError::HostNotFoundError:
+ case QBluetoothSocket::SocketError::ServiceNotFoundError:
return DC_STATUS_NODEVICE;
- case QBluetoothSocket::UnsupportedProtocolError:
+ case QBluetoothSocket::SocketError::UnsupportedProtocolError:
return DC_STATUS_PROTOCOL;
- case QBluetoothSocket::OperationError:
+ case QBluetoothSocket::SocketError::OperationError:
return DC_STATUS_UNSUPPORTED;
- case QBluetoothSocket::NetworkError:
+ case QBluetoothSocket::SocketError::NetworkError:
return DC_STATUS_IO;
default:
return DC_STATUS_IO;
@@ -140,7 +140,7 @@ static dc_status_t qt_serial_read(void *io, void* data, size_t size, size_t *act
for (;;) {
int rc;
- if (device->socket->state() != QBluetoothSocket::ConnectedState)
+ if (device->socket->state() != QBluetoothSocket::SocketState::ConnectedState)
return DC_STATUS_IO;
rc = device->socket->read((char *) data, size);
@@ -179,7 +179,7 @@ static dc_status_t qt_serial_write(void *io, const void* data, size_t size, size
for (;;) {
int rc;
- if (device->socket->state() != QBluetoothSocket::ConnectedState)
+ if (device->socket->state() != QBluetoothSocket::SocketState::ConnectedState)
return DC_STATUS_IO;
rc = device->socket->write((char *) data, size);