summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r--src/core/render_widget_host_view_qt.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 619577d93..ab9fb66fb 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -917,6 +917,9 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event)
case QEvent::InputMethod:
handleInputMethodEvent(static_cast<QInputMethodEvent*>(event));
break;
+ case QEvent::InputMethodQuery:
+ handleInputMethodQueryEvent(static_cast<QInputMethodQueryEvent*>(event));
+ break;
default:
return false;
}
@@ -1258,6 +1261,19 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
}
}
+void RenderWidgetHostViewQt::handleInputMethodQueryEvent(QInputMethodQueryEvent *ev)
+{
+ Qt::InputMethodQueries queries = ev->queries();
+ for (uint i = 0; i < 32; ++i) {
+ Qt::InputMethodQuery query = (Qt::InputMethodQuery)(int)(queries & (1<<i));
+ if (query) {
+ QVariant v = inputMethodQuery(query);
+ ev->setValue(query, v);
+ }
+ }
+ ev->accept();
+}
+
#ifndef QT_NO_ACCESSIBILITY
void RenderWidgetHostViewQt::accessibilityActiveChanged(bool active)
{