Commit 68350009 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Sort setting grid views alphabetically

BUG: 400404
FIXED-IN: 5.15.1

Differential Revision: https://phabricator.kde.org/D18815
parent e88ce4b3
......@@ -238,6 +238,9 @@ void KCMDesktopTheme::load()
}
}
m_model->setSortRole(ThemeNameRole); // FIXME the model should really be just using Qt::DisplayRole
m_model->sort(0 /*column*/);
KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("plasmarc")), "Theme");
setSelectedPlugin(cg.readEntry("name", m_defaultTheme->themeName()));
......
......@@ -170,6 +170,10 @@ void IconsModel::load()
m_data.append(item);
}
std::sort(m_data.begin(), m_data.end(), [](const IconsModelData &a, const IconsModelData &b) {
return a.display < b.display;
});
endResetModel();
// an item might have been added before the currently selected one
......
......@@ -137,6 +137,7 @@ void KCMSplashScreen::loadModel()
row->setData(pkg.metadata().comment(), DescriptionRole);
m_model->appendRow(row);
}
m_model->sort(0 /*column*/);
emit selectedPluginIndexChanged();
}
......
......@@ -244,6 +244,7 @@ void KCMLookandFeel::loadModel()
m_model->appendRow(row);
}
m_model->sort(0 /*column*/);
emit selectedPluginIndexChanged();
}
......
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