diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-11-19 08:12:37 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-11-19 09:18:48 +0100 |
commit | 0e54cfe785d124c07a12f5a4e8042e396e8da0d4 (patch) | |
tree | b43588c1c23eae4e449aef96e4676319a2211868 /src/client/qwaylandinputcontext.cpp | |
parent | 4ab9e45f4b0073e69a4a59b9fec22b276847eaac (diff) |
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 <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/client/qwaylandinputcontext.cpp')
-rw-r--r-- | src/client/qwaylandinputcontext.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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) |