From d765305595ce66ac64901c04f520af589b4ba558 Mon Sep 17 00:00:00 2001 From: Malte E Date: Sat, 19 Mar 2022 22:30:35 +0100 Subject: [PATCH] properly commit preedit text --- resources/qml/MessageInput.qml | 2 +- src/timeline/InputBar.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml index 9a21ac05..8090cd99 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml @@ -446,10 +446,10 @@ Rectangle { width: 22 height: 22 image: ":/icons/icons/ui/send.svg" + Layout.rightMargin: 8 ToolTip.visible: hovered ToolTip.text: qsTr("Send") onClicked: { - messageInput.append(messageInput.preeditText) room.input.send(); } } diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index cd7c4e0c..349ce7af 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -234,6 +235,8 @@ InputBar::nextText() void InputBar::send() { + QInputMethod *im = QGuiApplication::inputMethod(); + im->commit(); if (text().trimmed().isEmpty()) return;