From c5a6b894e7484544c44a8a415a84e196c4b633c3 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 6 May 2013 14:07:48 +0200 Subject: Fix the assert failure in QShortcutMap::find MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't send Qt::Key_unknown down the shortcut handling pipe, because unknown keys are not part of a shortcut sequence and results in an assert. Task-number: QTBUG-30871 Change-Id: Idd451fb793bd07124a96d75ed7b936f7ff584f28 Reviewed-by: Friedemann Kleint Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qshortcutmap.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/kernel/qshortcutmap.cpp') diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp index cd822090e2..513e21937e 100644 --- a/src/gui/kernel/qshortcutmap.cpp +++ b/src/gui/kernel/qshortcutmap.cpp @@ -324,6 +324,9 @@ bool QShortcutMap::tryShortcutEvent(QObject *o, QKeyEvent *e) { Q_D(QShortcutMap); + if (e->key() == Qt::Key_unknown) + return false; + bool wasAccepted = e->isAccepted(); bool wasSpontaneous = e->spont; if (d->currentState == QKeySequence::NoMatch) { -- cgit v1.2.3