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

Filter invalid services in most used model

Otherwise there'll be a blank spot.

BUG: 413178
FIXED-IN: 5.17.1

Differential Revision: https://phabricator.kde.org/D24818
parent 7fd83742
......@@ -169,6 +169,13 @@ public:
return roleNames;
}
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
{
const QString desktopName = sourceModel()->index(source_row, 0, source_parent).data(ResultModel::ResourceRole).toUrl().path();
KService::Ptr service = KService::serviceByStorageId(desktopName);
return service;
}
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
{
MenuItem *mi;
......
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