Changeset View
Changeset View
Standalone View
Standalone View
kioslave/applications/kio_applications.cpp
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Line(s) | 143 | { | |||
---|---|---|---|---|---|
151 | if (!grp || !grp->isValid()) { | 151 | if (!grp || !grp->isValid()) { | ||
152 | error(KIO::ERR_DOES_NOT_EXIST, groupPath); | 152 | error(KIO::ERR_DOES_NOT_EXIST, groupPath); | ||
153 | return; | 153 | return; | ||
154 | } | 154 | } | ||
155 | 155 | | |||
156 | unsigned int count = 0; | 156 | unsigned int count = 0; | ||
157 | KIO::UDSEntry entry; | 157 | KIO::UDSEntry entry; | ||
158 | 158 | | |||
159 | foreach (const KSycocaEntry::Ptr &e, grp->entries(true, true)) { | 159 | const auto entries = grp->entries(true, true); | ||
160 | for (const KSycocaEntry::Ptr &e : entries) { | ||||
160 | if (e->isType(KST_KServiceGroup)) { | 161 | if (e->isType(KST_KServiceGroup)) { | ||
161 | KServiceGroup::Ptr g(static_cast<KServiceGroup*>(e.data())); | 162 | KServiceGroup::Ptr g(static_cast<KServiceGroup*>(e.data())); | ||
162 | 163 | | |||
163 | //qDebug() << "ADDING SERVICE GROUP WITH PATH " << g->relPath(); | 164 | //qDebug() << "ADDING SERVICE GROUP WITH PATH " << g->relPath(); | ||
164 | 165 | | |||
165 | // Avoid adding empty groups. | 166 | // Avoid adding empty groups. | ||
166 | KServiceGroup::Ptr subMenuRoot = KServiceGroup::group(g->relPath()); | 167 | KServiceGroup::Ptr subMenuRoot = KServiceGroup::group(g->relPath()); | ||
167 | if (subMenuRoot->childCount() == 0) | 168 | if (subMenuRoot->childCount() == 0) | ||
Show All 30 Lines |