use foreach() for iteration in QIconLoader::findIconHelper()

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2020-07-02 01:27:59 +00:00
parent 8e1bd44ce1
commit 070a0557e7

View file

@ -199,11 +199,9 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName,
} }
QString contentDir = theme.contentDir() + QLatin1Char('/'); QString contentDir = theme.contentDir() + QLatin1Char('/');
QList<QIconDirInfo> subDirs = theme.keyList();
// Add all relevant files // Add all relevant files
for (int i = 0; i < subDirs.size() ; ++i) { foreach (const QIconDirInfo &dirInfo, theme.keyList()) {
const QIconDirInfo &dirInfo = subDirs.at(i);
const QString subDir = contentDir + dirInfo.path + QLatin1Char('/'); const QString subDir = contentDir + dirInfo.path + QLatin1Char('/');
const QString pngPath = subDir + iconName + QLatin1String(".png"); const QString pngPath = subDir + iconName + QLatin1String(".png");
if (QFile::exists(pngPath)) { if (QFile::exists(pngPath)) {