Commit a3aa9953 authored by Thiago Macieira's avatar Thiago Macieira
Browse files

QBluetoothUuid: add QDataStream operator<<,>>


Don't depend on QUuid's.

Change-Id: I495bc19409f348069f5bfffd15516db994a430e4
Reviewed-by: default avatarAlex Blasche <alexander.blasche@qt.io>
Showing with 12 additions and 0 deletions
...@@ -396,6 +396,18 @@ public: ...@@ -396,6 +396,18 @@ public:
static QString descriptorToString(DescriptorType uuid); 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 #ifndef QT_NO_DEBUG_STREAM
/// TODO: Move implementation to .cpp, uninline and add Q_BLUETOOTH_EXPORT for Qt 6 /// TODO: Move implementation to .cpp, uninline and add Q_BLUETOOTH_EXPORT for Qt 6
inline QDebug operator<<(QDebug debug, const QBluetoothUuid &uuid) inline QDebug operator<<(QDebug debug, const QBluetoothUuid &uuid)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment