summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@digia.com>2013-05-06 12:07:48 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-27 19:49:27 (GMT)
commit76101d520bf658e24c9d96a1f65173e7adf19513 (patch)
treec298cd06c8b6d0c1d9230968606ebd7005e2ba04 /src
parent52055f62bc6a6297b8cdb5ee708a2d170d45d5e0 (diff)
downloadQt-76101d520bf658e24c9d96a1f65173e7adf19513.zip
Qt-76101d520bf658e24c9d96a1f65173e7adf19513.tar.gz
Qt-76101d520bf658e24c9d96a1f65173e7adf19513.tar.bz2
Fix the assert failure in QShortcutMap::find
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 <Friedemann.Kleint@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> (cherry picked from qtbase/c5a6b894e7484544c44a8a415a84e196c4b633c3)
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qshortcutmap.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index 40e2b9e..0cf1371 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -331,6 +331,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) {