[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/widgets
From:       Frank Reininghaus <frank78ac () googlemail ! com>
Date:       2009-06-24 21:06:06
Message-ID: 1245877566.854674.13529.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 986666 by freininghaus:

Remove '&'s (which are interpreted as indicators for keyboard
shortcuts by QTabWidget and therefore not shown in the tab title) from
the string that is going to be the tab tooltip (which is shown as it
is by QTabWidget). "&&" is replaced by '&'.

BUG: 195596


 M  +8 -3      ktabwidget.cpp  


--- trunk/KDE/kdelibs/kdeui/widgets/ktabwidget.cpp #986665:986666
@@ -214,10 +214,15 @@
   m_parent->setTabToolTip( index, QString() );
 
   if ( title.length() > m_currentTabLength ) {
-    if ( Qt::mightBeRichText( title ) )
-      m_parent->setTabToolTip( index, Qt::escape( title ) );
+    QString toolTipText = title;
+    // Remove '&'s, which are indicators for keyboard shortcuts in tab titles. "&&" \
is replaced by '&'. +    for ( int i = toolTipText.indexOf( '&' ); i >= 0 && i < \
toolTipText.length(); i = toolTipText.indexOf( '&', i + 1 ) ) +      \
toolTipText.remove( i, 1 ); +
+    if ( Qt::mightBeRichText( toolTipText ) )
+      m_parent->setTabToolTip( index, Qt::escape( toolTipText ) );
     else
-      m_parent->setTabToolTip( index, title );
+      m_parent->setTabToolTip( index, toolTipText );
   }
 
   title = KStringHandler::rsqueeze( title, m_currentTabLength ).leftJustified( \
m_minLength, ' ' );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic