Commit 9ef9a79f authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

icons kcm: Clear pending deletions when Defaults button is clicked

This makes it consistent with other KCMs and makes it more predictable:
When the user clicks default and then apply one would not expect the
KCM to delete entries. Especially in case the user has clicked buttons
by accident and wants to return to the initial state.
parent 3f76ff92
......@@ -495,4 +495,12 @@ int IconModule::pluginIndex(const QString &themeName) const
return -1;
void IconModule::defaults()
for (int i = 0, count = m_model->rowCount(QModelIndex()); i < count; ++i) {
m_model->setData(m_model->index(i), false, IconsModel::Roles::PendingDeletionRole);
#include "main.moc"
......@@ -73,6 +73,7 @@ public:
void load() override;
void save() override;
void defaults() override;
Q_INVOKABLE void ghnsEntriesChanged();
Q_INVOKABLE void installThemeFromFile(const QUrl &url);
Supports Markdown
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