diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-09-12 13:35:22 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-09-15 15:27:09 +0200 |
commit | f2a2800b37f91069959dad74d4cd186f72e57695 (patch) | |
tree | a9e72b45d5672348b0b0ae3f5b3b11841448169f /src/plugins/platforms/cocoa | |
parent | f14b8c829425f54521c3411633dc716490249d34 (diff) |
QWSI: Remove dead code for macOS-specific shortcut-override handling
The macOS platform plugin exclusively uses handleExtendedKeyEvent() these
days, never the simpler handleKeyEvent(), and always passes false for the
tryShortcutOverride argument, so the special-cased code was never executed.
No other platform passes the optional tryShortcutOverride argument, so
it can be removed completely.
If we ever need to bring back this kind of logic it should live in the
macOS platform plugin, not in the QWSI layer.
We have to keep the existing logic for qt_handleKeyEvent() though,
as that's exercised through QTest::simulateEvent(). The next step
would be to remove the QWindowSystemInterface::handleShortcutEvent()
call in QGuiApplicationPrivate::processKeyEvent() and teach existing
platform plugins, as well as the QTest machinery, to handle shortcuts
explicitly before sending raw key events.
Change-Id: I6eb3fd18c64d1619e33e79f076e25efd299a9ba7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview_keys.mm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_keys.mm b/src/plugins/platforms/cocoa/qnsview_keys.mm index dc669d6f3b..49bbe2308a 100644 --- a/src/plugins/platforms/cocoa/qnsview_keys.mm +++ b/src/plugins/platforms/cocoa/qnsview_keys.mm @@ -250,10 +250,9 @@ bool KeyEvent::sendWindowSystemEvent(QWindow *window) const case QEvent::KeyPress: case QEvent::KeyRelease: { static const int count = 1; - static const bool tryShortcutOverride = false; QWindowSystemInterface::handleExtendedKeyEvent(window, timestamp, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, - text, isRepeat, count, tryShortcutOverride); + text, isRepeat, count); // FIXME: Make handleExtendedKeyEvent synchronous return QWindowSystemInterface::flushWindowSystemEvents(); } |