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

[Splash KCM] Sort "None" first

Like it used to be before it was alphabetically sorted.

Differential Revision: https://phabricator.kde.org/D19701
parent dfbf2cc0
......@@ -124,11 +124,6 @@ void KCMSplashScreen::loadModel()
{
m_model->clear();
QStandardItem* row = new QStandardItem(i18n("None"));
row->setData("None", PluginNameRole);
row->setData(i18n("No splash screen will be shown"), DescriptionRole);
m_model->appendRow(row);
const QList<Plasma::Package> pkgs = availablePackages(QStringLiteral("splashmainscript"));
for (const Plasma::Package &pkg : pkgs) {
QStandardItem* row = new QStandardItem(pkg.metadata().name());
......@@ -138,6 +133,12 @@ void KCMSplashScreen::loadModel()
m_model->appendRow(row);
}
m_model->sort(0 /*column*/);
QStandardItem* row = new QStandardItem(i18n("None"));
row->setData("None", PluginNameRole);
row->setData(i18n("No splash screen will be shown"), DescriptionRole);
m_model->insertRow(0, row);
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