summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2020-01-10 10:24:52 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2020-01-15 16:13:55 +0100
commit075050991bbdc8c165b5ccf809516e3eaa5ee859 (patch)
tree3ba92da38d6cfa3eb4313d724789f5a0f25219b2 /src
parenta76801c8aa19c8328fe4f90426a5783a78b3c348 (diff)
Fix overriding shortcuts in password input fields on Windows
Windows IME does not support hidden text therefore IME input is disabled on password fields. The shortcuts are supposed to be overridden in input fields. Checking the keyboard focus on an input field is done by verifying if the IME is enabled. This won't work with password fields on platforms where hidden text is not supported, so also check if the Qt::ImhHiddenText IME hint is set. Fixes: QTBUG-81206 Change-Id: I81870beb556a9dda67295496dad8b672fbc5eba2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/render_widget_host_view_qt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 901cbf0bd..e9be587cf 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -1089,7 +1089,7 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event)
#endif
};
- if (!inputMethodQuery(Qt::ImEnabled).toBool() && !acceptKeyOutOfInputField(keyEvent))
+ if (!inputMethodQuery(Qt::ImEnabled).toBool() && !(inputMethodQuery(Qt::ImHints).toInt() & Qt::ImhHiddenText) && !acceptKeyOutOfInputField(keyEvent))
return false;
Q_ASSERT(m_editCommand.empty());