Null out the d pointer in QQuickMouseEventEx dtor
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Mon, 21 May 2012 06:30:07 +0000 (09:30 +0300)
committerQt by Nokia <qt-info@nokia.com>
Mon, 21 May 2012 10:40:55 +0000 (12:40 +0200)
Otherwise every single app will assert in ~QEvent when
QML_TRANSLATE_TOUCH_TO_MOUSE is enabled.

Change-Id: Ib0590a980cb00b913ec096bcdfba57fffaa19eb1
Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/quick/items/qquickevents_p_p.h

index 9b67c2b..1809394 100644 (file)
@@ -170,6 +170,11 @@ public:
         }
     }
 
+    ~QQuickMouseEventEx()
+    {
+        d = 0;
+    }
+
     static const QQuickMouseEventEx *extended(const QMouseEvent *e) {
         const QQuickMouseEventEx *ex = static_cast<const QQuickMouseEventEx*>(e);
         return reinterpret_cast<const QMouseEvent*>(ex->d) == e ? ex : 0;