diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2023-08-10 13:02:13 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-08-11 19:58:01 +0200 |
commit | 8b5fb76d3426250343d838dbee4bdf3d02817ceb (patch) | |
tree | f0cc0fbc25b0252fc9db7cdd66719eb92df1b97d /tests/auto/corelib/text/qlocale | |
parent | ffaa1281d492d9ab1b0301944c12301dacff55cb (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.cpp | 3 |
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; |