summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/quuid.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-05-21 10:53:43 +0200
committerMarc Mutz <marc.mutz@qt.io>2024-05-28 12:39:27 +0000
commite0d87f70d87a63aa55a11ecb91f8d355767d61bd (patch)
treed14b615f57b6c920cd7205fb1c45fc4f2c5d223f /src/corelib/plugin/quuid.cpp
parent19e3ec4e2fe1c6d27570ee68480846e9dbf87db7 (diff)
Replace QUuid::toRfc4122() with toBytes() where possible
They're content-equivalent, except that the latter doesn't have to allocate a return value on the heap. Pick-to: 6.7 Change-Id: Ifcae47b487c80c2bac02900f08393b386cfe806c Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/plugin/quuid.cpp')
-rw-r--r--src/corelib/plugin/quuid.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 42f21eea88c..8c3b758aaca 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -119,7 +119,7 @@ static QUuid _q_uuidFromHex(const char *src)
static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCryptographicHash::Algorithm algorithm, int version)
{
QCryptographicHash hash(algorithm);
- hash.addData(ns.toRfc4122());
+ hash.addData(QByteArrayView{ns.toBytes()});
hash.addData(baseData);
QByteArrayView hashResult = hash.resultView();
Q_ASSERT(hashResult.size() >= 16);