Commit 34d1c29d authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Port away from Q_FOREACH

parent 3078d735
Pipeline #3090 canceled with stage
......@@ -74,10 +74,10 @@ void ThemeListModel::reload()
// get all desktop themes
QStringList themes;
const QStringList &packs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "plasma/desktoptheme", QStandardPaths::LocateDirectory);
foreach (const QString &ppath, packs) {
for (const QString &ppath : packs) {
const QDir cd(ppath);
const QStringList &entries = cd.entryList(QDir::Dirs | QDir::Hidden);
foreach (const QString pack, entries) {
for (const QString &pack : entries) {
const QString _metadata = ppath+QLatin1Char('/')+pack+QStringLiteral("/metadata.desktop");
if ((pack != "." && pack != "..") &&
(QFile::exists(_metadata))) {
......@@ -86,7 +86,7 @@ void ThemeListModel::reload()
}
}
foreach (const QString &theme, themes) {
for (const QString &theme : themes) {
int themeSepIndex = theme.lastIndexOf('/', -1);
QString themeRoot = theme.left(themeSepIndex);
int themeNameSepIndex = themeRoot.lastIndexOf('/', -1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment