summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-06-23 13:40:54 +0200
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-07-07 22:26:11 +0000
commit99afd9dd4c6670f1010153a97efdcfa1014042a0 (patch)
tree32e69b6f3736b18c678c94bfdbf6ee9f45998d59
parent219d99fb25fbe8d18d0bdb15c2465863a1915638 (diff)
Fix QAction::setAutoRepeat(false)
When cleaning up the shortcut override code, in d7ca800a87a2291c94c6580f0cfe068bb2280caf passing on the autorepeat flags from the native event was accidentally dropped in the call to QWindowSystemInterface::tryHandleShortcutEvent. Task-number: QTBUG-46569 Change-Id: Ib053e11e582de630a1fc1b754f8d10d995c88026 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 6aa1d26c66..8ebddf33a6 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1884,7 +1884,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
#if !defined(Q_OS_OSX)
// On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent()
const bool checkShortcut = e->keyType == QEvent::KeyPress && window != 0;
- if (checkShortcut && QWindowSystemInterface::tryHandleShortcutEvent(window, e->timestamp, e->key, e->modifiers, e->unicode))
+ if (checkShortcut && QWindowSystemInterface::tryHandleShortcutEvent(window, e->timestamp, e->key, e->modifiers, e->unicode, e->repeat, e->repeatCount))
return;
#endif // Q_OS_OSX
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 355704ff37..456c9d8c68 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -1431,7 +1431,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
if (eventType == QEvent::KeyPress) {
if (m_composingText.isEmpty())
- m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutEvent(focusWindow, timestamp, keyCode, modifiers, text);
+ m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutEvent(focusWindow, timestamp, keyCode, modifiers, text, [nsevent isARepeat], 1);
QObject *fo = QGuiApplication::focusObject();
if (m_sendKeyEvent && fo) {