From a3ce1235493622e51aa872511ea80081f9e96805 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 23 Dec 2015 00:15:30 +0100 Subject: QtCore: eradicate all Q_FOREACH loops [tools] Saves just under 5.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I6d868a7d2e469cf0564127b0e66cd7b272a0c9cd Reviewed-by: Thiago Macieira --- src/corelib/tools/qlocale_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qlocale_win.cpp') diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp index a5eb7ec058..14133a83f1 100644 --- a/src/corelib/tools/qlocale_win.cpp +++ b/src/corelib/tools/qlocale_win.cpp @@ -678,7 +678,7 @@ QVariant QSystemLocalePrivate::uiLanguages() bool found = false; // Since ApplicationLanguages:::Languages uses long names, we compare the "pre-dash" part of // the language and filter it out, if it is already covered by a more specialized form. - foreach (const QString &lang, result) { + for (const QString &lang : qAsConst(result)) { int dashIndex = lang.indexOf('-'); // There will not be any long name after the first short name was found, so we can stop. if (dashIndex == -1) -- cgit v1.2.3