From 0e54cfe785d124c07a12f5a4e8042e396e8da0d4 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 19 Nov 2020 08:12:37 +0100 Subject: Fix compilation after removing QEvent copy ctor In 19f9b0d5f54379151eb71e98555b203ad6756276 in qtbase, the copy constructors for QEvents were removed, so code using this has to be updated. Change-Id: I5798b240d79f78c47374d60947b1bc66598ff3b5 Reviewed-by: Volker Hilsheimer --- src/client/qwaylandinputcontext.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/client/qwaylandinputcontext.cpp') diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp index e9afe05ed..6c586960e 100644 --- a/src/client/qwaylandinputcontext.cpp +++ b/src/client/qwaylandinputcontext.cpp @@ -269,12 +269,13 @@ void QWaylandTextInput::zwp_text_input_v2_preedit_string(const QString &text, co if (!QGuiApplication::focusObject()) return; - QInputMethodEvent event = m_builder.buildPreedit(text); + QInputMethodEvent *event = m_builder.buildPreedit(text); m_builder.reset(); m_preeditCommit = commit; - QCoreApplication::sendEvent(QGuiApplication::focusObject(), &event); + QCoreApplication::sendEvent(QGuiApplication::focusObject(), event); + delete event; } void QWaylandTextInput::zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) @@ -298,11 +299,12 @@ void QWaylandTextInput::zwp_text_input_v2_commit_string(const QString &text) if (!QGuiApplication::focusObject()) return; - QInputMethodEvent event = m_builder.buildCommit(text); + QInputMethodEvent *event = m_builder.buildCommit(text); m_builder.reset(); - QCoreApplication::sendEvent(QGuiApplication::focusObject(), &event); + QCoreApplication::sendEvent(QGuiApplication::focusObject(), event); + delete event; } void QWaylandTextInput::zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) -- cgit v1.2.3