summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothuuid.h
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-01-24 14:04:03 +0100
committerAlex Blasche <alexander.blasche@qt.io>2018-01-25 09:30:59 +0000
commitda4273723f42bb53827124101d91afa97d14b984 (patch)
tree095ae674005708a51a6d2efce148c1bf804aad5a /src/bluetooth/qbluetoothuuid.h
parent1653ae6e8782fb96999a53736a773e9a31d86b8a (diff)
Avoid wrong implicit cast leading to wrong connectToService() call
Prior to this change passing a QBluetoothUuid::ServiceClassUuid to connectToService() caused the port overload to be called rather than the QBluetoothUuid version. This patch introduces a ServiceClassUuid overload that avoids relying on implicit type conversion. There is a remote chance that this patch breaks existing code if the remote port was in the same range as the ServiceClassUuid range. In general the Bluetooth ports are below 100 though. Task-number: QTBUG-65831 Change-Id: I6574291ae6fee284466d84ecb91f21e3be89f6b2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothuuid.h')
-rw-r--r--src/bluetooth/qbluetoothuuid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothuuid.h b/src/bluetooth/qbluetoothuuid.h
index 27e26a67..25c7896c 100644
--- a/src/bluetooth/qbluetoothuuid.h
+++ b/src/bluetooth/qbluetoothuuid.h
@@ -58,6 +58,7 @@ struct quint128
class Q_BLUETOOTH_EXPORT QBluetoothUuid : public QUuid
{
public:
+ //TODO Qt 6: Convert enums to scoped enums (see QTBUG-65831)
enum ProtocolUuid {
Sdp = 0x0001,
Udp = 0x0002,