[kde-doc-english] [Bug 292603] KHelpCenter crash in KHC::Navigator::selectItem

Christopher Yeleighton giecrilj at stegny.2a.pl
Sat Jan 28 01:54:01 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=292603


Christopher Yeleighton <giecrilj at stegny.2a.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DOWNSTREAM




--- Comment #3 from Christopher Yeleighton <giecrilj stegny 2a pl>  2012-01-28 01:54:00 ---
--- khelpcenter/navigator.cpp.orig
+++ khelpcenter/navigator.cpp
@@ -65,6 +65,7 @@
 #include "searchwidget.h"
 #include "searchengine.h"
 #include "docmetainfo.h"
+#include "docentry.h"
 #include "docentrytraverser.h"
 #include "glossary.h"
 #include "toc.h"
@@ -268,6 +269,11 @@ void Navigator::createItemFromDesktopFil
                                            const QString &file )
 {
     KDesktopFile desktopFile( file );
+
+    if (!DocEntry::isForRunningDesktopEnvironment(desktopFile)) {
+      return;
+    }
+
     QString docPath = desktopFile.readDocPath();
     if ( !docPath.isNull() ) {
       // First parameter is ignored if second is an absolute path
@@ -310,6 +316,9 @@ void Navigator::selectItem( const KUrl &
   {
      alternativeURL.setQuery("anchor="+url.ref());
      alternativeURL.setRef(QString());
+  } else if (url.url().endsWith("/index.html"))
+  {
+    alternativeURL = KUrl (url.url().left (url.url().length() - strlen
("/index.html")));
   }

   // If the navigator already has the given URL selected, do nothing.
Index: khelpcenter/navigatoritem.cpp

Bug Novell 743932 Submitted

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the kde-doc-english mailing list