diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2016-12-19 16:51:45 +0100 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2017-01-20 13:01:11 +0000 |
commit | 9cc6592de3029da98be34a54b56bbd004e93d569 (patch) | |
tree | 425d7448223fcb8825962be7c6fa6cb05ccd375e /src/core/render_widget_host_view_qt.cpp | |
parent | 4634c2467875e44a5cae5bc1ce015ca7a8115682 (diff) |
Make input method hints available via RWHV delegate widget
Moreover, set ImHiddenText hint for password fields and add back the
corresponding widget auto test.
Task-number: QTBUG-55766
Change-Id: I3f76e19c8c33e11f3d9f515b6dc7d6e998c3c9a4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r-- | src/core/render_widget_host_view_qt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 70ffe0dcb..0a41d67ae 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -116,7 +116,7 @@ static inline Qt::InputMethodHints toQtInputMethodHints(ui::TextInputType inputT case ui::TEXT_INPUT_TYPE_SEARCH: return Qt::ImhPreferLowercase | Qt::ImhNoAutoUppercase; case ui::TEXT_INPUT_TYPE_PASSWORD: - return Qt::ImhSensitiveData | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase; + return Qt::ImhSensitiveData | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase | Qt::ImhHiddenText; case ui::TEXT_INPUT_TYPE_EMAIL: return Qt::ImhEmailCharactersOnly; case ui::TEXT_INPUT_TYPE_NUMBER: @@ -575,6 +575,7 @@ void RenderWidgetHostViewQt::TextInputStateChanged(const content::TextInputState { m_currentInputType = params.type; m_delegate->inputMethodStateChanged(params.type != ui::TEXT_INPUT_TYPE_NONE); + m_delegate->setInputMethodHints(toQtInputMethodHints(params.type)); } void RenderWidgetHostViewQt::ImeCancelComposition() |