mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
properly commit preedit text
This commit is contained in:
parent
a35f5e81cd
commit
d765305595
2 changed files with 4 additions and 1 deletions
|
@ -446,10 +446,10 @@ Rectangle {
|
||||||
width: 22
|
width: 22
|
||||||
height: 22
|
height: 22
|
||||||
image: ":/icons/icons/ui/send.svg"
|
image: ":/icons/icons/ui/send.svg"
|
||||||
|
Layout.rightMargin: 8
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.text: qsTr("Send")
|
ToolTip.text: qsTr("Send")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
messageInput.append(messageInput.preeditText)
|
|
||||||
room.input.send();
|
room.input.send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <QDropEvent>
|
#include <QDropEvent>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
#include <QInputMethod>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QMimeDatabase>
|
#include <QMimeDatabase>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
@ -234,6 +235,8 @@ InputBar::nextText()
|
||||||
void
|
void
|
||||||
InputBar::send()
|
InputBar::send()
|
||||||
{
|
{
|
||||||
|
QInputMethod *im = QGuiApplication::inputMethod();
|
||||||
|
im->commit();
|
||||||
if (text().trimmed().isEmpty())
|
if (text().trimmed().isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue