From c2924536202aff0de054bab984c7305ee9eca1c9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 4 Oct 2014 14:02:26 -0500 Subject: Sort non-root entries in KHelpCenter Make KHelpCenter entry sorting case-insensitive This resolves Bug 1849 --- khelpcenter/navigator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'khelpcenter/navigator.cpp') diff --git a/khelpcenter/navigator.cpp b/khelpcenter/navigator.cpp index 7d865d9a8..22f530a1f 100644 --- a/khelpcenter/navigator.cpp +++ b/khelpcenter/navigator.cpp @@ -230,6 +230,7 @@ void Navigator::insertParentAppDocs( const TQString &name, NavigatorItem *topIte } createItemFromDesktopFile( topItem, desktopFile ); } + topItem->sortChildItems( 0, true /* ascending */ ); } void Navigator::insertIOSlaveDocs( const TQString &name, NavigatorItem *topItem ) @@ -269,8 +270,10 @@ void Navigator::insertAppletDocs( NavigatorItem *topItem ) TQStringList files = appletDir.entryList( TQDir::Files | TQDir::Readable ); TQStringList::ConstIterator it = files.begin(); TQStringList::ConstIterator end = files.end(); - for ( ; it != end; ++it ) + for ( ; it != end; ++it ) { createItemFromDesktopFile( topItem, appletDir.absPath() + "/" + *it ); + } + topItem->sortChildItems( 0, true /* ascending */ ); } void Navigator::createItemFromDesktopFile( NavigatorItem *topItem, -- cgit v1.2.1