From ef71908c6aeb324be057f9bfbb62bfd185fb6cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 18 Mar 2012 17:29:14 +0100 Subject: [PATCH] fix ShortcutDialog to allow clearing the shortcut BUG: 234793 REVIEW: 104336 --- utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils.cpp b/utils.cpp index a9abc5d503..070bc977eb 100644 --- a/utils.cpp +++ b/utils.cpp @@ -496,6 +496,11 @@ void ShortcutDialog::keySequenceChanged(const QKeySequence &seq) if (_shortcut == seq) return; // don't try to update the same + if (seq.isEmpty()) { // clear + _shortcut = seq; + return; + } + // Check if the key sequence is used currently QString sc = seq.toString(); // NOTICE - seq.toString() & the entries in "conflicting" randomly get invalidated after the next call (if no sc has been set & conflicting isn't empty?!)