summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2020-09-07 13:23:14 +0200
committerKai Koehne <kai.koehne@qt.io>2020-09-14 12:41:00 +0200
commitcdb9ffd7e1e075a5fafb1477e2e87bef0b3fa49d (patch)
treecf314e17c738d071ed2e8e6924e5f6eae8ed4974 /src/gui/text
parent0c02f133f3daee146b805149e69bba8cee6727b2 (diff)
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>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/windows/qwindowsfontdatabase_ft.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/windows/qwindowsfontdatabase_ft.cpp b/src/gui/text/windows/qwindowsfontdatabase_ft.cpp
index 284b43a1bf..d047532c3c 100644
--- a/src/gui/text/windows/qwindowsfontdatabase_ft.cpp
+++ b/src/gui/text/windows/qwindowsfontdatabase_ft.cpp
@@ -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)");