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

List:       kde-commits
Subject:    KDE/kdegraphics/kolourpaint/tools
From:       Andreas Hartmetz <ahartmetz () gmail ! com>
Date:       2006-11-28 0:18:14
Message-ID: 1164673094.904668.10573.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 608591 by ahartmetz:

better porting to new KShortcut

 M  +5 -5      kptool.cpp  


--- trunk/KDE/kdegraphics/kolourpaint/tools/kptool.cpp #608590:608591
@@ -172,11 +172,11 @@
 QString kpTool::toolTipForTextAndShortcut (const QString &text,
                                            const KShortcut &shortcut)
 {
-    const QKeySequence seq = shortcut.primary(); // TODO evaluate alternate() too?
-    if (seq.count () == 1 && ::KeyIsText (seq [0]))
+    foreach(const QKeySequence &seq, shortcut.toList())
     {
-        return i18nc ("<Tool Name> (<Single Accel Key>)",
-                      "%1 (%2)", text, seq.toString ().toUpper ());
+        if (seq.count () == 1 && ::KeyIsText (seq [0]))
+            return i18nc ("<Tool Name> (<Single Accel Key>)",
+                          "%1 (%2)", text, seq.toString ().toUpper ());
     }
 
     return text;
@@ -214,7 +214,7 @@
 
     if (key)
     {
-        shortcut.setAlternate (key);
+        shortcut.setPrimary (key);
         // (CTRL+<key>, ALT+<key>, CTRL+ALT+<key>, CTRL+SHIFT+<key>
         //  all clash with global KDE shortcuts)
         shortcut.setAlternate (Qt::ALT + Qt::SHIFT + key);
[prev in list] [next in list] [prev in thread] [next in thread] 

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