QPublicSuffixDatabase: don't go thru QString for debug output

The data is guaranteed to be in US-ASCII (result of toHex()), so
there's no need to jump through ASCII → UTF-16 → UTF-8 hoops.

Found by Clang and QT_ASCII_CAST_WARN.

Amends 16b614f2e1.

Change-Id: Ib6789af9fb90952ecbe805e182b0639e1d0704b1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
bb10
Marc Mutz 2022-03-07 14:43:48 +01:00
parent fc1487878b
commit 4b768b9f34
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ bool QPublicSuffixDatabase::loadFile(const QString &fileName)
auto header = systemFile->read(DafsaFileHeader.size());
if (header != DafsaFileHeader) {
qCWarning(lcTld, "Invalid publicsuffix file header: %s", qUtf8Printable(header.toHex()));
qCWarning(lcTld, "Invalid publicsuffix file header: %s", header.toHex().constData());
return false;
}