summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qlocale_unix.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-07-20 21:23:32 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-07-26 01:29:15 +0200
commit88f2a78594e0272d7916e13aca39611a85571937 (patch)
treea7bd08976dad2ba32d6d66c02370b1b0cf4c64b1 /src/corelib/text/qlocale_unix.cpp
parent15a80cf8a9d59203f8e2b436a5c804197c044807 (diff)
QLocale: port to qsizetype [1/N]: indexed to ranged loops
Ranged for loops are independent of the container's size_type, so port what we can to them. Pick-to: 6.4 6.3 Task-number: QTBUG-103531 Change-Id: I0fd5c9c721e892ea617f0b56b8ea423e7a9f0d04 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale_unix.cpp')
-rw-r--r--src/corelib/text/qlocale_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qlocale_unix.cpp b/src/corelib/text/qlocale_unix.cpp
index c0f44fb953..6f6884d366 100644
--- a/src/corelib/text/qlocale_unix.cpp
+++ b/src/corelib/text/qlocale_unix.cpp
@@ -244,9 +244,9 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const
else
lst = languages.split(u':');
- for (int i = 0; i < lst.size(); ++i) {
+ for (const QString &e : std::as_const(lst)) {
QStringView language, script, territory;
- if (qt_splitLocaleName(lst.at(i), &language, &script, &territory)) {
+ if (qt_splitLocaleName(e, &language, &script, &territory)) {
QString joined = language.isEmpty() ? u"und"_s : language.toString();
if (!script.isEmpty())
joined += u'-' + script;