diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-06-12 23:42:59 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-10-30 11:40:18 +0100 |
commit | d7ca800a87a2291c94c6580f0cfe068bb2280caf (patch) | |
tree | 8eb635ee119d6b6e893b98df3c3cc04a90da4ba1 /src/gui/kernel/qguiapplication.cpp | |
parent | f6f797a6c3b794d14c312855bacc8b5b89ea6127 (diff) |
Clean up ShortcutOverride handling
Instead of sending the event from random places, send it from
QWindowSystemInterface. This allows to send override events on OS X to
menus before doing other key processing and reduces the number of
ShortcutOverride events on all platforms to exactly one per key press
event.
Additional test by Friedemann Kleint.
Task-number: QTBUG-38986
Change-Id: I6981bb776aba586ebc7c3daa5fd7a0d84c25bc3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8c71fb23de..2e050572c1 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1538,18 +1538,6 @@ int QGuiApplication::exec() */ bool QGuiApplication::notify(QObject *object, QEvent *event) { -#ifndef QT_NO_SHORTCUT - if (event->type() == QEvent::KeyPress) { - // Try looking for a Shortcut before sending key events - QWindow *w = qobject_cast<QWindow *>(object); - QObject *focus = w ? w->focusObject() : 0; - if (!focus) - focus = object; - if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focus, static_cast<QKeyEvent *>(event))) - return true; - } -#endif - if (object->isWindowType()) QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(object), event); return QCoreApplication::notify(object, event); |