use foreach() for iteration in QIconTheme constructor

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2020-08-03 20:10:14 +03:00
parent 747ccc91ed
commit 1c974b1b36

View file

@ -130,10 +130,7 @@ QIconTheme::QIconTheme(const QString &themeName)
}
if (m_valid) {
const QSettings indexReader(m_contentDir + QLatin1String("/index.theme"), QSettings::IniFormat);
QStringListIterator keyIterator(indexReader.keys());
while (keyIterator.hasNext()) {
const QString key = keyIterator.next();
foreach (const QString &key, indexReader.keys()) {
if (key.endsWith(QLatin1String("/Size"))) {
// Note the QSettings ini-format does not accept
// slashes in key names, hence we have to cheat