From daec4364bd8f495d6b882b82e2ac2697acfbf2aa Mon Sep 17 00:00:00 2001 From: Christoph Feck Date: Tue, 31 Aug 2010 16:39:34 +0000 Subject: [PATCH] Fix tool tips to not show '&' added by KAcceleratorManager I have no idea why you don't see them, Martin. It may be possible to disable automatic accelerator assignment in KDE via some configuration option. Check the code to find out ;) See http://reviewboard.kde.org/r/5191/ BUG: 241073 FIXED-IN: 4.6.0 svn path=/trunk/KDE/kdebase/workspace/; revision=1170350 --- kcmkwin/kwinscreenedges/monitor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kcmkwin/kwinscreenedges/monitor.cpp b/kcmkwin/kwinscreenedges/monitor.cpp index 2e6228f1e1..7f234d08fd 100644 --- a/kcmkwin/kwinscreenedges/monitor.cpp +++ b/kcmkwin/kwinscreenedges/monitor.cpp @@ -22,6 +22,7 @@ along with this program. If not, see . #include "monitor.h" #include +#include #include #include #include @@ -157,7 +158,10 @@ void Monitor::selectEdgeItem( int edge, int index ) { popup_actions[ edge ][ index ]->setChecked( true ); setEdge( edge, !popup_actions[ edge ][ 0 ]->isChecked()); - items[ edge ]->setToolTip( popup_actions[ edge ][ index ]->text() ); + QString actionText = popup_actions[ edge ][ index ]->text(); + // remove accelerators added by KAcceleratorManager + actionText = KGlobal::locale()->removeAcceleratorMarker( actionText ); + items[ edge ]->setToolTip( actionText ); } int Monitor::selectedEdgeItem( int edge ) const @@ -183,7 +187,7 @@ void Monitor::popup( Corner* c, QPoint pos ) selectEdgeItem( i, popup_actions[ i ].indexOf( a )); emit changed(); emit edgeSelectionChanged( i, popup_actions[ i ].indexOf( a )); - c->setToolTip( a->text() ); + c->setToolTip( KGlobal::locale()->removeAcceleratorMarker( a->text() )); } return; }