diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2024-05-21 10:53:43 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2024-05-28 12:39:27 +0000 |
| commit | e0d87f70d87a63aa55a11ecb91f8d355767d61bd (patch) | |
| tree | d14b615f57b6c920cd7205fb1c45fc4f2c5d223f /src/corelib/plugin/quuid.cpp | |
| parent | 19e3ec4e2fe1c6d27570ee68480846e9dbf87db7 (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.cpp | 2 |
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); |
