]> Git trees. - libqmvoc.git/commitdiff
backport of the fix for bug #142047 v4.1.1
authorCarsten Niehaus <cniehaus@gmx.de>
Tue, 5 Aug 2008 16:53:10 +0000 (16:53 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Tue, 5 Aug 2008 16:53:10 +0000 (16:53 +0000)
svn path=/branches/KDE/4.1/kdeedu/libkdeedu/; revision=842626

kdeeduui/kdeeduglossary.cpp

index a98167b1fc29072224d3deb2c8a6076c571d0b0c..aa500f28c5ce5c6c944ea82a61cf4de45ae8b65b 100644 (file)
@@ -376,8 +376,9 @@ void GlossaryDialog::keyPressEvent(QKeyEvent* e)
 
 void GlossaryDialog::Private::displayItem( const KUrl &url, const KParts::OpenUrlArguments &, const KParts::BrowserArguments & )
 {
-       // using the "host" part of a kurl as reference
-       QString myurl = url.host().toLower();
+       // using the "path" part of a kurl as reference
+       QString myurl = url.path().toLower();
+
     QTreeWidgetItemIterator it( m_glosstree );
     while ( *it )
     {
@@ -503,11 +504,11 @@ QString GlossaryItem::parseReferences() const
                return QString();
 
        QString htmlcode = "<h3>" + i18n( "References" ) + "</h3><ul type=\"disc\">";
-       static QString basehref = QString( "<li><a href=\"item://%1\" title=\"%2\">%3</a></li>" );
+       static QString basehref = QString( "<li><a href=\"item:%1\" title=\"%2\">%3</a></li>" );
        
        foreach ( const QString& ref, m_ref )
        {
-               htmlcode += basehref.arg( ref, i18n( "Go to '%1'", ref ), ref );
+               htmlcode += basehref.arg( KUrl::toPercentEncoding( ref ), i18n( "Go to '%1'", ref ), ref );
        }
        htmlcode += "</ul>";