From 075050991bbdc8c165b5ccf809516e3eaa5ee859 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Fri, 10 Jan 2020 10:24:52 +0100 Subject: 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 --- src/core/render_widget_host_view_qt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/render_widget_host_view_qt.cpp') 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()); -- cgit v1.2.3