Changeset View
Changeset View
Standalone View
Standalone View
khelpcenter/navigator.cpp
Context not available. | |||||
216 | list = KServiceTypeTrader::self()->query( QStringLiteral("KCModule"), QStringLiteral("[X-KDE-ParentApp] == 'kinfocenter'") ); | 216 | list = KServiceTypeTrader::self()->query( QStringLiteral("KCModule"), QStringLiteral("[X-KDE-ParentApp] == 'kinfocenter'") ); | ||
---|---|---|---|---|---|
217 | } | 217 | } | ||
218 | 218 | | |||
219 | bool no_children_present = true; | ||||
220 | | ||||
219 | for ( KService::List::const_iterator it = list.constBegin(); it != list.constEnd(); ++it ) | 221 | for ( KService::List::const_iterator it = list.constBegin(); it != list.constEnd(); ++it ) | ||
220 | { | 222 | { | ||
221 | KService::Ptr s(*it); | 223 | KService::Ptr s(*it); | ||
222 | QString desktopFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kservices5/") + s->entryPath() ); | 224 | QString desktopFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kservices5/") + s->entryPath() ); | ||
223 | createItemFromDesktopFile( topItem, desktopFile ); | 225 | createItemFromDesktopFile( topItem, desktopFile ); | ||
226 | no_children_present = false; | ||||
224 | } | 227 | } | ||
225 | topItem->sortChildren( 0, Qt::AscendingOrder /* ascending */ ); | 228 | topItem->sortChildren( 0, Qt::AscendingOrder /* ascending */ ); | ||
229 | topItem->setHidden(no_children_present); | ||||
226 | } | 230 | } | ||
227 | 231 | | |||
228 | void Navigator::insertIOSlaveDocs( const QString &name, NavigatorItem *topItem ) | 232 | void Navigator::insertIOSlaveDocs( const QString &name, NavigatorItem *topItem ) | ||
Context not available. |