summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-04-28 09:22:35 +0200
committerJędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>2016-04-28 13:37:20 +0000
commite730a8c6a54807e9688651723de27100931ce08a (patch)
tree1f80f3da126a00654de7cd2d03e76c4e58d758b0
parent80d691afb1864f89778eb6846088887be56ba594 (diff)
downloadqtquickcontrols-e730a8c6a54807e9688651723de27100931ce08a.tar.gz
QQuickMouseThief: guard the target item with a QPointer
tst_extras::Tests_Common::test_resize(PieMenu) is constantly crashing in the Win 10 CI. This is a random shot attempting to solve the crash. We're not able to reproduce the issue locally or even when running the test manually on the CI. Change-Id: I4722b7ea9aeca640991602d1148a61eaa91066b3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
-rw-r--r--src/extras/Private/qquickmousethief_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/extras/Private/qquickmousethief_p.h b/src/extras/Private/qquickmousethief_p.h
index 3b1a5a4d..0c787b01 100644
--- a/src/extras/Private/qquickmousethief_p.h
+++ b/src/extras/Private/qquickmousethief_p.h
@@ -38,6 +38,7 @@
#define MOUSETHIEF_H
#include <QObject>
+#include <QPointer>
#include <QtQuick/QQuickItem>
class QQuickMouseThief : public QObject
@@ -78,7 +79,7 @@ private:
void emitReleased(const QPointF &pos);
void emitClicked(const QPointF &pos);
- QQuickItem *mItem;
+ QPointer<QQuickItem> mItem;
bool mReceivedPressEvent;
bool mAcceptCurrentEvent;
};