diff --git a/navigatorappgroupitem.cpp b/navigatorappgroupitem.cpp --- a/navigatorappgroupitem.cpp +++ b/navigatorappgroupitem.cpp @@ -89,6 +89,7 @@ return; } KServiceGroup::List list = root->entries(); + bool no_children_present = true; for ( KServiceGroup::List::ConstIterator it = list.constBegin(); @@ -106,6 +107,7 @@ DocEntry *entry = new DocEntry( s->name(), url, s->icon() ); NavigatorAppItem *item = new NavigatorAppItem( entry, this ); item->setAutoDeleteDocEntry( true ); + no_children_present = false; } break; } @@ -119,14 +121,16 @@ appItem = new NavigatorAppGroupItem( entry, this, g->relPath() ); appItem->setAutoDeleteDocEntry( true ); if ( recursive ) appItem->populate( recursive ); + no_children_present = false; break; } default: break; } } sortChildren( 0, Qt::AscendingOrder /* ascending */ ); mPopulated = true; + setHidden(no_children_present); } QString NavigatorAppGroupItem::documentationURL( const KService *s )