tst_QLocale: clean out the last use of foreach

Change-Id: I0a4810dbae2137764ea1d14d515e9f06f7f2129d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Edward Welbourne 2023-08-10 13:02:13 +02:00
parent ffaa1281d4
commit 8b5fb76d34

View File

@ -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;