diff --git a/kcms/desktoptheme/kcm.cpp b/kcms/desktoptheme/kcm.cpp --- a/kcms/desktoptheme/kcm.cpp +++ b/kcms/desktoptheme/kcm.cpp @@ -282,6 +282,9 @@ } } + 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())); diff --git a/kcms/icons/iconsmodel.cpp b/kcms/icons/iconsmodel.cpp --- a/kcms/icons/iconsmodel.cpp +++ b/kcms/icons/iconsmodel.cpp @@ -170,6 +170,10 @@ 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 diff --git a/kcms/ksplash/kcm.cpp b/kcms/ksplash/kcm.cpp --- a/kcms/ksplash/kcm.cpp +++ b/kcms/ksplash/kcm.cpp @@ -137,6 +137,7 @@ row->setData(pkg.metadata().comment(), DescriptionRole); m_model->appendRow(row); } + m_model->sort(0 /*column*/); emit selectedPluginIndexChanged(); } diff --git a/kcms/lookandfeel/kcm.cpp b/kcms/lookandfeel/kcm.cpp --- a/kcms/lookandfeel/kcm.cpp +++ b/kcms/lookandfeel/kcm.cpp @@ -244,6 +244,7 @@ m_model->appendRow(row); } + m_model->sort(0 /*column*/); emit selectedPluginIndexChanged(); }