diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-11-17 20:31:00 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-11-28 10:31:34 -0800 |
commit | b27020d4d24667831869d11b0a19057ff347658d (patch) | |
tree | 9cdde4b87e04259c896bc44082b88ba8fd89e2af | |
parent | 906057ee3c9c5602f5802a055283699d21c8929b (diff) |
QBluetoothUuid: simplify one attribute creation
QUuid can create ID128 strings on its own.
Change-Id: Id8e48e8f498c4a029619fffd1728938a1b70e4a0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/bluetooth/qbluetoothserviceinfo.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo.cpp b/src/bluetooth/qbluetoothserviceinfo.cpp index dc9f9e9a..927b9edd 100644 --- a/src/bluetooth/qbluetoothserviceinfo.cpp +++ b/src/bluetooth/qbluetoothserviceinfo.cpp @@ -584,7 +584,7 @@ static void dumpAttributeVariant(QDebug dbg, const QVariant &var, const QString& case 16: dbg << QString::asprintf("%suuid %s\n", indent.toUtf8().constData(), - QByteArray(reinterpret_cast<const char *>(uuid.toUInt128().data), 16).toHex().constData()); + uuid.toByteArray(QUuid::Id128).constData()); break; default: dbg << QString::asprintf("%suuid ???\n", indent.toUtf8().constData()); diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp index 262fac02..5d1c2c1b 100644 --- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp +++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp @@ -207,7 +207,7 @@ static void dumpAttributeVariant(const QVariant &var, const QString indent) qDebug("%suuid %08x", indent.toLocal8Bit().constData(), uuid.toUInt32()); break; case 16: { - qDebug("%suuid %s", indent.toLocal8Bit().constData(), QByteArray(reinterpret_cast<const char *>(uuid.toUInt128().data), 16).toHex().constData()); + qDebug("%suuid %s", indent.toLocal8Bit().constData(), uuid.toByteArray(QUuid::Id128).constData()); break; } default: |