summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothuuid.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-11-18 11:06:21 -0800
committerIvan Solovev <ivan.solovev@qt.io>2023-02-15 22:42:21 +0100
commit1e903be81f43da4e31385bb7866bb4d3f07e5eba (patch)
tree0ebe5f26bc267a150aad349077b2b40d74c7b1a1 /src/bluetooth/qbluetoothuuid.h
parentf6f75200436f5ed0506fe94a31e8a15e39b45c81 (diff)
QBluetoothUuid: remove quint128 support
Only kept for in removed_api.cpp for binary compatibility. [ChangeLog][QtBluetooth] The undocumented quint128 was removed from QtBluetooth. This affects the QBluetoothUuid constructor and the toUInt128() method. QUuid has support for an integer quint128 on certain 64-bit platforms (all except MSVC) with a constructor and a getter of the same name, so this change is mostly source-compatible, so long as the application code doesn't attempt to treat this type as a structure. For cross-platform support, use QUuid::Id128Bytes. Change-Id: Id8e48e8f498c4a029619fffd1728c34931ac525e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothuuid.h')
-rw-r--r--src/bluetooth/qbluetoothuuid.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bluetooth/qbluetoothuuid.h b/src/bluetooth/qbluetoothuuid.h
index f0081201..6ee1f26f 100644
--- a/src/bluetooth/qbluetoothuuid.h
+++ b/src/bluetooth/qbluetoothuuid.h
@@ -14,10 +14,12 @@
QT_BEGIN_NAMESPACE
+#if QT_BLUETOOTH_REMOVED_SINCE(6, 6)
struct quint128
{
- quint8 data[16];
+ QUuid::Id128Bytes d;
};
+#endif
class Q_BLUETOOTH_EXPORT QBluetoothUuid : public QUuid
{
@@ -345,7 +347,6 @@ public:
explicit constexpr QBluetoothUuid(quint32 uuid) noexcept
: QUuid(uuid, 0x0, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb) {};
- explicit QBluetoothUuid(quint128 uuid);
explicit QBluetoothUuid(const QString &uuid);
QBluetoothUuid(const QBluetoothUuid &uuid) = default;
QBluetoothUuid(const QUuid &uuid);
@@ -369,7 +370,11 @@ public:
quint16 toUInt16(bool *ok = nullptr) const;
quint32 toUInt32(bool *ok = nullptr) const;
+
+#if QT_BLUETOOTH_REMOVED_SINCE(6, 6)
+ explicit QBluetoothUuid(quint128 uuid);
quint128 toUInt128() const;
+#endif
static QString serviceClassToString(ServiceClassUuid uuid);
static QString protocolToString(ProtocolUuid uuid);