Windows: Fix clang error about copy on loop
clang on Windows shows an error: qtbase/src/gui/text/windows/qwindowsfontdatabase_ft.cpp:122:25: error: loop variable 'key' of type 'const QString' creates a copy from type 'const QString' [-Werror,-Wrange-loop-construct] for (const auto key : keys) { ^ Change-Id: Icdfa5e2a6753450213dcb96df70247c5a71c2293 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
0c02f133f3
commit
cdb9ffd7e1
@ -119,7 +119,7 @@ static FontKeys &fontKeys()
|
||||
if (result.isEmpty()) {
|
||||
const QStringList keys = { QStringLiteral("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"),
|
||||
QStringLiteral("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts") };
|
||||
for (const auto key : keys) {
|
||||
for (const auto &key : keys) {
|
||||
const QSettings fontRegistry(key, QSettings::NativeFormat);
|
||||
const QStringList allKeys = fontRegistry.allKeys();
|
||||
const QString trueType = QStringLiteral("(TrueType)");
|
||||
|
Loading…
x
Reference in New Issue
Block a user