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

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/actions
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2010-08-31 14:19:42
Message-ID: 20100831141942.40EEDAC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1170325 by cfeck:

Use KLocale implementation instead of custom one


 M  +2 -11     kselectaction.cpp  


--- trunk/KDE/kdelibs/kdeui/actions/kselectaction.cpp #1170324:1170325
@@ -38,6 +38,7 @@
 #include <QToolBar>
 #include <QStandardItem>
 #include <kicon.h>
+#include <klocale.h>
 #include <kdebug.h>
 
 #include "kcombobox.h"
@@ -48,18 +49,8 @@
 // display ampersands literally.
 static QString DropAmpersands(const QString &text)
 {
-    QString result;
-    for (int i = 0; i < text.count(); ++i) {
-        if (text.at(i) == '&') {
-            if (i + 1 < text.count() && text.at(i + 1) == '&')
-                result.append(text.at(i++)); // "&&" -> '&'
-            // else eat the ampersand
+    return KGlobal::locale()->removeAcceleratorMarker(text);
         }
-        else
-            result.append(text.at(i));
-    }
-    return result;
-}
 
 
 KSelectAction::KSelectAction(QObject *parent)
[prev in list] [next in list] [prev in thread] [next in thread] 

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