32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
Index: kdeui/shortcuts/kdedglobalaccel.cpp
|
|
===================================================================
|
|
--- kdeui/shortcuts/kdedglobalaccel.cpp (Revision 870758)
|
|
+++ kdeui/shortcuts/kdedglobalaccel.cpp (Revision 870759)
|
|
@@ -361,8 +361,9 @@
|
|
|
|
void KdedGlobalAccel::unRegister(const QStringList &actionId)
|
|
{
|
|
+ kDebug(125) << actionId;
|
|
+
|
|
Q_ASSERT(actionId.size()==4);
|
|
-
|
|
if (actionId.size() < 4) {
|
|
return;
|
|
}
|
|
@@ -586,7 +587,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);
|
|
+ }
|
|
}
|
|
}
|
|
}
|