diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-09-30 15:19:14 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-09-30 20:56:48 +0200 |
| commit | bbc8f8f7a8a4d8fe15871e428bec6c49abf32673 (patch) | |
| tree | 1457c0f47a34b70d735c11b2dba2d78b41ced4d1 /src/corelib/kernel/qobject.cpp | |
| parent | 6b494c507d51b2b24cb48578216cf4e200a6e7d8 (diff) | |
QSysInfo: don't pass QStringLiteral to QWinRegistryKey::stringValue()
The stringValue() function took QStringView from the initial commit of
the class, so passing QStringLiteral (which creates and destroys a
full QString instance, and, until recently, even injected an
additional isNull() branch when converted to QStringView) was never
necessary; a UTF-16 string literal would have always sufficed, and be
faster.
Since the API will will soon be changed to take const wchar_t*, use a
wchar_t literal instead of char16_t one. For QStringView, it doesn't
matter (on Windows, at least), but it keeps the call compatible with
the future QWinRegistryKey API.
Amends 80996d2e5d6d04b08452cf507f6ced7d8a09068c.
Pick-to: 6.10 6.8 6.5
Change-Id: If88fb074c72bf3a41adf5cfb4b68f185c24481fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
0 files changed, 0 insertions, 0 deletions
