Showstopper in 4.1.2

David Faure faure at kde.org
Fri Oct 10 10:20:08 CEST 2008


The bug that is fixed by the commit below, is being reported by tons of users.
A lot of things in KDE doesn't work for them, since kded crashes on startup
due to a wrong assert.

I suggest:
- that all packagers who still can, should include the patch below in updated 4.1.2 packages
- that we make a 4.1.3 *soon*

----------  Forwarded Message  ----------

Subject: KDE/kdelibs/kdeui/shortcuts
Date: Wednesday 01 October 2008
From: Michael Jansen <kde at michael-jansen.biz>
To: kde-commits at kde.org

SVN commit 866736 by mjansen:

Fix those kdedglobalaccel crashes. It's not safe to assume the config file
has a correct content. Somehow it get's messed up sometimes and contains
something like this:

  next=Meta+B,Meta+B,
  nextTrack=Meta+B,Meta+B,

BUG:171870
CCBUG:171206

 M  +10 -2     kdedglobalaccel.cpp  


--- trunk/KDE/kdelibs/kdeui/shortcuts/kdedglobalaccel.cpp #866735:866736
@@ -394,8 +394,9 @@
 
 void KdedGlobalAccel::unRegister(const QStringList &actionId)
 {
+    kDebug(125) << actionId;
+
     Q_ASSERT(actionId.size()==4);
-
     if (actionId.size() < 4) {
         return;
     }
@@ -661,7 +662,14 @@
 
             foreach (int key, ad->keys) {
                 if (key != 0) {
-                    d->keyToAction.insert(key, ad);
+                    if (d->keyToAction.contains(key)) {
+                        // The shortcut is already used. The config file is
+                        // broken. Ignore the request.
+                        ad->keys.removeAll(key);
+                        kWarning() << "Shortcut found twice in kglobalshortcutsrc.";
+                    } else {
+                        d->keyToAction.insert(key, ad);
+                    }
                 }
             }
         }


-------------------------------------------------------

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the release-team mailing list