Fix QAction::setAutoRepeat(false)

When cleaning up the shortcut override code, in
d7ca800a87 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>
This commit is contained in:
Frederik Gladhorn 2015-06-23 13:40:54 +02:00
parent 219d99fb25
commit 99afd9dd4c
2 changed files with 2 additions and 2 deletions

View File

@ -1884,7 +1884,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
#if !defined(Q_OS_OSX) #if !defined(Q_OS_OSX)
// On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent() // On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent()
const bool checkShortcut = e->keyType == QEvent::KeyPress && window != 0; 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; return;
#endif // Q_OS_OSX #endif // Q_OS_OSX

View File

@ -1431,7 +1431,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
if (eventType == QEvent::KeyPress) { if (eventType == QEvent::KeyPress) {
if (m_composingText.isEmpty()) 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(); QObject *fo = QGuiApplication::focusObject();
if (m_sendKeyEvent && fo) { if (m_sendKeyEvent && fo) {