summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnsview.mm
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-05-06 17:00:22 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-05-06 22:01:23 +0200
commitb24da5449bc0520b8c6eb9a943f934d95fd49cfa (patch)
tree14bf47e72884c999606428c463ec1f6ddff22bdd /src/plugins/platforms/cocoa/qnsview.mm
parent11ae678b9d9b3ea60c3c210cdb129d7abe7d4471 (diff)
macOS: in password lineedits, pass dead keys to the input method
Otherwise the IM cannot correctly compose the input, making it impossible to enter e.g. ü or ~ on certain keyboard layouts. Note that the native macOS NSSecureTextField does not allow that either, which is however a very bad user experience. With this change, the modifier characters like ¨ diacritics will be visible when entering them in either NoEcho or Password line edits. The follow-up commit will remove those as well. Fixes: QTBUG-84664 Change-Id: Ib4c5ab85634c17c407623f82b46c4849c72d9e69 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 471fa368c3..8e4efc6fb6 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -125,6 +125,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSViewMouseMoveHelper);
Qt::MouseButtons m_frameStrutButtons;
QString m_composingText;
QPointer<QObject> m_composingFocusObject;
+ bool m_lastKeyDead;
bool m_sendKeyEvent;
bool m_dontOverrideCtrlLMB;
bool m_sendUpAsRightButton;
@@ -142,6 +143,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSViewMouseMoveHelper);
{
if ((self = [super initWithFrame:NSZeroRect])) {
m_platformWindow = platformWindow;
+ m_lastKeyDead = false;
m_sendKeyEvent = false;
m_inputSource = nil;
m_resendKeyEvent = false;