[Mac] Fix modifier reporting issue in the key events

This issue was introduced when porting key handling code from Qt4 to Qt5.
To conform to the implementation of QKeyEvent::modifiers() we have to invert
modifier state logic before sending them as QKeyEvents.

Task-number: QTBUG-31332
Change-Id: I3bb41169f8ab2a4b0a13a224bb461d2792d3a65f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Gatis Paeglis 2013-05-24 15:20:56 +02:00 committed by The Qt Project
parent 23214c815e
commit 58a4bf2c99

View File

@ -1036,7 +1036,7 @@ static QTouchDevice *touchDevice = 0;
timestamp,
(lastKnownModifiers & mac_mask) ? QEvent::KeyRelease : QEvent::KeyPress,
modifier_key_symbols[i].qt_code,
qmodifiers);
qmodifiers ^ [QNSView convertKeyModifiers:mac_mask]);
}
}