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/shared | |
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/shared')
-rw-r--r-- | src/shared/qwaylandinputmethodeventbuilder.cpp | 12 | ||||
-rw-r--r-- | src/shared/qwaylandinputmethodeventbuilder_p.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp index 5f3c8a55d..00e3ae14e 100644 --- a/src/shared/qwaylandinputmethodeventbuilder.cpp +++ b/src/shared/qwaylandinputmethodeventbuilder.cpp @@ -117,7 +117,7 @@ void QWaylandInputMethodEventBuilder::setPreeditCursor(int32_t index) m_preeditCursor = index; } -QInputMethodEvent QWaylandInputMethodEventBuilder::buildCommit(const QString &text) +QInputMethodEvent *QWaylandInputMethodEventBuilder::buildCommit(const QString &text) { QList<QInputMethodEvent::Attribute> attributes; @@ -141,13 +141,13 @@ QInputMethodEvent QWaylandInputMethodEventBuilder::buildCommit(const QString &te QVariant())); } - QInputMethodEvent event(QString(), attributes); - event.setCommitString(text, replacement.first, replacement.second); + QInputMethodEvent *event = new QInputMethodEvent(QString(), attributes); + event->setCommitString(text, replacement.first, replacement.second); return event; } -QInputMethodEvent QWaylandInputMethodEventBuilder::buildPreedit(const QString &text) +QInputMethodEvent *QWaylandInputMethodEventBuilder::buildPreedit(const QString &text) { QList<QInputMethodEvent::Attribute> attributes; @@ -163,10 +163,10 @@ QInputMethodEvent QWaylandInputMethodEventBuilder::buildPreedit(const QString &t attributes.append(QInputMethodEvent::Attribute(attr.type, start, length, attr.value)); } - QInputMethodEvent event(text, attributes); + QInputMethodEvent *event = new QInputMethodEvent(text, attributes); const QPair<int, int> replacement = replacementForDeleteSurrounding(); - event.setCommitString(QString(), replacement.first, replacement.second); + event->setCommitString(QString(), replacement.first, replacement.second); return event; } diff --git a/src/shared/qwaylandinputmethodeventbuilder_p.h b/src/shared/qwaylandinputmethodeventbuilder_p.h index a234cf44b..2499a563f 100644 --- a/src/shared/qwaylandinputmethodeventbuilder_p.h +++ b/src/shared/qwaylandinputmethodeventbuilder_p.h @@ -58,8 +58,8 @@ public: void addPreeditStyling(uint32_t index, uint32_t length, uint32_t style); void setPreeditCursor(int32_t index); - QInputMethodEvent buildCommit(const QString &text); - QInputMethodEvent buildPreedit(const QString &text); + QInputMethodEvent *buildCommit(const QString &text); + QInputMethodEvent *buildPreedit(const QString &text); static int indexFromWayland(const QString &text, int length, int base = 0); static int indexToWayland(const QString &text, int length, int base = 0); |