┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/settings/services
diff options
context:
space:
mode:
authorAlexander Lohnau <[email protected]>2020-09-05 17:32:48 +0000
committerElvis Angelaccio <[email protected]>2020-09-05 17:32:48 +0000
commit8e2f0a1d5b88f9ac6e06a0ac7a64d7080198f678 (patch)
treed55048dcacf5b5803be8bc0266caebd3b88f18dc /src/settings/services
parenta1d5d75bea304aad11eb4ae08198f552e7f8f0a1 (diff)
Clear services model after KNS entries changed
We can not know if a service got deleted, so we clear the model and reload the services. The issue that the entries are not uninstalled has already been solved, this is just a patch to fix the state of the UI. CCBUG: 420312
Diffstat (limited to 'src/settings/services')
-rw-r--r--src/settings/services/servicessettingspage.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/settings/services/servicessettingspage.cpp b/src/settings/services/servicessettingspage.cpp
index b7a9624b6..6ce5e1fc9 100644
--- a/src/settings/services/servicessettingspage.cpp
+++ b/src/settings/services/servicessettingspage.cpp
@@ -73,7 +73,13 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) :
auto *downloadButton = new KNS3::Button(i18nc("@action:button", "Download New Services..."),
QStringLiteral("servicemenu.knsrc"),
this);
- connect(downloadButton, &KNS3::Button::dialogFinished, this, &ServicesSettingsPage::loadServices);
+ connect(downloadButton, &KNS3::Button::dialogFinished, this, [this](const KNS3::Entry::List &changedEntries) {
+ if (!changedEntries.isEmpty()) {
+ m_serviceModel->clear();
+ loadServices();
+ }
+ });
+
#endif
topLayout->addWidget(label);