summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qtranslator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 09d8d76271..ce1d4917cb 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -668,7 +668,8 @@ static QString find_translation(const QLocale & locale,
}
// start guessing
- for (QString localeName : qAsConst(fuzzyLocales)) {
+ for (const QString &fuzzyLocale : qAsConst(fuzzyLocales)) {
+ QStringRef localeName(&fuzzyLocale);
for (;;) {
int rightmost = localeName.lastIndexOf(QLatin1Char('_'));
// no truncations? fail