mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
list applications more in depth
go recursively in deep categories, without being recursive this makes all apps to appear and not only those at the first level of subcategories
This commit is contained in:
parent
5af4b0f4b1
commit
b6bbc208aa
1 changed files with 8 additions and 3 deletions
|
|
@ -101,8 +101,9 @@ void ApplicationListModel::loadApplications()
|
|||
QList<ApplicationData> unorderedList;
|
||||
|
||||
// Iterate over all entries in the group
|
||||
for(KServiceGroup::List::ConstIterator it = subGroupList.constBegin(); it != subGroupList.constEnd(); it++) {
|
||||
KSycocaEntry::Ptr groupEntry = (*it);
|
||||
while (!subGroupList.isEmpty()) {
|
||||
KSycocaEntry::Ptr groupEntry = subGroupList.first();
|
||||
subGroupList.pop_front();
|
||||
|
||||
if (groupEntry->isType(KST_KServiceGroup)) {
|
||||
KServiceGroup::Ptr serviceGroup(static_cast<KServiceGroup* >(groupEntry.data()));
|
||||
|
|
@ -114,7 +115,11 @@ void ApplicationListModel::loadApplications()
|
|||
KSycocaEntry::Ptr entry = (*it);
|
||||
ApplicationData data;
|
||||
|
||||
if (entry->property("Exec").isValid()) {
|
||||
if (entry->isType(KST_KServiceGroup)) {
|
||||
KServiceGroup::Ptr serviceGroup(static_cast<KServiceGroup* >(entry.data()));
|
||||
subGroupList << serviceGroup;
|
||||
|
||||
} else if (entry->property("Exec").isValid()) {
|
||||
KService::Ptr service(static_cast<KService* >(entry.data()));
|
||||
|
||||
qDebug() << " desktopEntryName: " << service->desktopEntryName();
|
||||
|
|
|
|||
Loading…
Reference in a new issue