summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qlocale
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-08-10 13:02:13 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2023-08-11 19:58:01 +0200
commit8b5fb76d3426250343d838dbee4bdf3d02817ceb (patch)
treef0cc0fbc25b0252fc9db7cdd66719eb92df1b97d /tests/auto/corelib/text/qlocale
parentffaa1281d492d9ab1b0301944c12301dacff55cb (diff)
tst_QLocale: clean out the last use of foreach
Change-Id: I0a4810dbae2137764ea1d14d515e9f06f7f2129d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/text/qlocale')
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 99398340f6..c7017b8511 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -201,7 +201,8 @@ void tst_QLocale::initTestCase()
// Get an environment free of any locale-related variables
cleanEnv.clear();
- foreach (QString const& entry, QProcess::systemEnvironment()) {
+ const QStringList sysenv = QProcess::systemEnvironment();
+ for (const QString &entry : sysenv) {
if (entry.startsWith("LANG=") || entry.startsWith("LC_") || entry.startsWith("LANGUAGE="))
continue;
cleanEnv << entry;