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>
This commit is contained in:
parent
8aff3d0bed
commit
c5a6b894e7
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user