From 43840350a1597d58116c36137c046ef595c57ed4 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Fri, 23 Nov 2018 09:22:38 +0100 Subject: Disable text prediction for input This is a workaround to avoid issues with QtVirtualKeyboard when used with QtWebEngine. Task-number: QTBUG-70158 Task-number: QTBUG-71995 Change-Id: I1e6fcd4dceb131dbe781dd7ab3856cb154ac6a18 Reviewed-by: Allan Sandfeld Jensen --- src/core/render_widget_host_view_qt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 2326dbdf7..99bda12d1 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -754,7 +754,7 @@ void RenderWidgetHostViewQt::OnUpdateTextInputStateCalled(content::TextInputMana } ui::TextInputType type = getTextInputType(); - m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType())); + m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText); m_surroundingText = QString::fromStdString(state->value); // Remove IME composition text from the surrounding text @@ -1112,7 +1112,7 @@ QVariant RenderWidgetHostViewQt::inputMethodQuery(Qt::InputMethodQuery query) // TODO: Implement this return QVariant(); // No limit. case Qt::ImHints: - return int(toQtInputMethodHints(getTextInputType())); + return int(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText); default: return QVariant(); } -- cgit v1.2.3