Fix global modifiers state after triggering shortcuts

When using for example alt-tab in Qt Creator, the list of recent documents
is kept open as long as alt is pressed. The new
tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev) function failed
to record the modifier state (contrary to the other overloads).

Change-Id: Ia0fc5d1ff486aa5aac7e25b41acb972dcb6dbf7d
Task-number: QTBUG-47122
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
bb10
Frederik Gladhorn 2015-08-27 13:46:53 +02:00
parent 8948042bd0
commit b098f83444
1 changed files with 1 additions and 0 deletions

View File

@ -229,6 +229,7 @@ bool QWindowSystemInterface::tryHandleShortcutOverrideEvent(QWindow *w, QKeyEven
{
#ifndef QT_NO_SHORTCUT
Q_ASSERT(ev->type() == QKeyEvent::ShortcutOverride);
QGuiApplicationPrivate::modifier_buttons = ev->modifiers();
QObject *focus = w->focusObject();
if (!focus)