summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-09-04 23:39:51 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-10-19 03:28:54 +0000
commita3aa995332c3afdba6e56527263363ac593f6f58 (patch)
tree0e1da9a31afa96a8a6c956398afe89d71e2c032f
parent97dc04e0d74687b4cafab3676d3582f758a0a4cc (diff)
QBluetoothUuid: add QDataStream operator<<,>>
Don't depend on QUuid's. Change-Id: I495bc19409f348069f5bfffd15516db994a430e4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/bluetooth/qbluetoothuuid.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothuuid.h b/src/bluetooth/qbluetoothuuid.h
index 25c7896c..dd587694 100644
--- a/src/bluetooth/qbluetoothuuid.h
+++ b/src/bluetooth/qbluetoothuuid.h
@@ -396,6 +396,18 @@ public:
static QString descriptorToString(DescriptorType uuid);
};
+#ifndef QT_NO_DATASTREAM
+inline QDataStream &operator<<(QDataStream &s, const QBluetoothUuid &uuid)
+{
+ return s << static_cast<const QUuid &>(uuid);
+}
+
+inline QDataStream &operator>>(QDataStream &s, QBluetoothUuid &uuid)
+{
+ return s >> static_cast<QUuid &>(uuid);
+}
+#endif
+
#ifndef QT_NO_DEBUG_STREAM
/// TODO: Move implementation to .cpp, uninline and add Q_BLUETOOTH_EXPORT for Qt 6
inline QDebug operator<<(QDebug debug, const QBluetoothUuid &uuid)