summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-25 14:05:52 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-11-26 06:13:12 +0000
commit0a14eaf04aab6ae9d1e6f56a36ba1a53517e2553 (patch)
tree0ce10afb5178a81c31e9f2202f5b8226d260bc7b
parent498757c44c7cbaaf9dd5aa74fdffece3caf95ddf (diff)
Use event cloning rather than copying
Fixes: QTBUG-88834 Change-Id: I8c21b07c9d8491f26589f29b04d552835b3cbd11 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 78cbb25b9d70f1617ff6c912a22ac532b0352bde) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/embedded/flickable/flickable.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/embedded/flickable/flickable.cpp b/examples/embedded/flickable/flickable.cpp
index 15c1873e53..8cf7a28cde 100644
--- a/examples/embedded/flickable/flickable.cpp
+++ b/examples/embedded/flickable/flickable.cpp
@@ -196,7 +196,7 @@ void Flickable::handleMouseRelease(QMouseEvent *event)
QMouseEvent *event1 = new QMouseEvent(QEvent::MouseButtonPress,
d->pressPos, Qt::LeftButton,
Qt::LeftButton, Qt::NoModifier);
- QMouseEvent *event2 = new QMouseEvent(*event);
+ QMouseEvent *event2 = event->clone();
d->ignoreList << event1;
d->ignoreList << event2;
QApplication::postEvent(d->target, event1);