]> Git trees. - libqmvoc.git/commitdiff
put html tooltips for the items in the references section
authorPino Toscano <pino@kde.org>
Tue, 13 Feb 2007 14:45:15 +0000 (14:45 +0000)
committerPino Toscano <pino@kde.org>
Tue, 13 Feb 2007 14:45:15 +0000 (14:45 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=633216

kdeeduui/kdeeduglossary.cpp

index 5b39475fa1e5b42e4671242cb6509152f564b9b2..779b0bed272d30a7ce0ff302f2e7b4a75c216a71 100644 (file)
@@ -451,10 +451,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>" );
        
-       for ( int i = 0; i < m_ref.size(); i++ )
+       foreach ( const QString& ref, m_ref )
        {
-               htmlcode += QString( "<li><a href=\"item://%1\">%2</a></li>" ).arg( m_ref[i], m_ref[i] );
+               htmlcode += basehref.arg( ref, i18n( "Go to '%1'", ref ), ref );
        }
        htmlcode += "</ul>";