Changeset View
Changeset View
Standalone View
Standalone View
dataengines/apps/appsource.cpp
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | |||||
66 | void AppSource::updateGroup() | 66 | void AppSource::updateGroup() | ||
67 | { | 67 | { | ||
68 | setData(QStringLiteral("iconName"), m_group->icon()); | 68 | setData(QStringLiteral("iconName"), m_group->icon()); | ||
69 | setData(QStringLiteral("name"), m_group->caption()); | 69 | setData(QStringLiteral("name"), m_group->caption()); | ||
70 | setData(QStringLiteral("comment"), m_group->comment()); | 70 | setData(QStringLiteral("comment"), m_group->comment()); | ||
71 | setData(QStringLiteral("display"), !m_group->noDisplay()); | 71 | setData(QStringLiteral("display"), !m_group->noDisplay()); | ||
72 | 72 | | |||
73 | QStringList entries; | 73 | QStringList entries; | ||
74 | foreach (KSycocaEntry::Ptr p, m_group->entries(true, false, true)) { | 74 | const auto groupEntries = m_group->entries(true, false, true); | ||
75 | for (KSycocaEntry::Ptr p : groupEntries) { | ||||
75 | if (p->isType(KST_KService)) { | 76 | if (p->isType(KST_KService)) { | ||
76 | const KService::Ptr service(static_cast<KService*>(p.data())); | 77 | const KService::Ptr service(static_cast<KService*>(p.data())); | ||
77 | entries << service->storageId(); | 78 | entries << service->storageId(); | ||
78 | } else if (p->isType(KST_KServiceGroup)) { | 79 | } else if (p->isType(KST_KServiceGroup)) { | ||
79 | const KServiceGroup::Ptr serviceGroup(static_cast<KServiceGroup*>(p.data())); | 80 | const KServiceGroup::Ptr serviceGroup(static_cast<KServiceGroup*>(p.data())); | ||
80 | entries << serviceGroup->entryPath(); | 81 | entries << serviceGroup->entryPath(); | ||
81 | } else if (p->isType(KST_KServiceSeparator)) { | 82 | } else if (p->isType(KST_KServiceSeparator)) { | ||
82 | entries << QStringLiteral("---"); | 83 | entries << QStringLiteral("---"); | ||
Show All 24 Lines |