From d09cfe04b82c1bd0738bca24def1e9c3bfdaaa4b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 26 Jan 2016 14:38:54 +0100 Subject: QtGui: eradicate Q_FOREACH loops [already const] (or trivially marked const) ... by replacing them with C++11 range-for loops. Change-Id: I3cce92b9d77a3ff96fad877d1d989145e530646f Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Lars Knoll --- src/gui/image/qiconloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/image/qiconloader.cpp') diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 8cc1dfa7d0..a600aa3299 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -412,12 +412,12 @@ QThemeIconInfo QIconLoader::findIconHelper(const QString &themeName, // a massive amount of file stat (especially if the icon is not there) auto cache = theme.m_gtkCaches.at(i); if (cache->isValid()) { - auto result = cache->lookup(iconNameFallback); + const auto result = cache->lookup(iconNameFallback); if (cache->isValid()) { const QVector subDirsCopy = subDirs; subDirs.clear(); subDirs.reserve(result.count()); - foreach (const char *s, result) { + for (const char *s : result) { QString path = QString::fromUtf8(s); auto it = std::find_if(subDirsCopy.cbegin(), subDirsCopy.cend(), [&](const QIconDirInfo &info) { -- cgit v1.2.3