From 8e2f0a1d5b88f9ac6e06a0ac7a64d7080198f678 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sat, 5 Sep 2020 17:32:48 +0000 Subject: 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 --- src/settings/servicemodel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/settings/servicemodel.cpp') diff --git a/src/settings/servicemodel.cpp b/src/settings/servicemodel.cpp index 81810b0a0..41c00a958 100644 --- a/src/settings/servicemodel.cpp +++ b/src/settings/servicemodel.cpp @@ -92,3 +92,10 @@ int ServiceModel::rowCount(const QModelIndex& parent) const return m_items.count(); } +void ServiceModel::clear() +{ + beginRemoveRows(QModelIndex(), 0, m_items.count()); + m_items.clear(); + endRemoveRows(); +} + -- cgit v1.3