diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-08-11 06:59:06 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2011-08-11 07:00:03 (GMT) |
commit | 206c9ba930095efb6d569f6e61a9809f16361dd5 (patch) | |
tree | 327f3b2f87c5ac4c9fbce831076ccd2765c1ddb1 /src/gui | |
parent | ce36e8afa47e3625737208b5a912f9f191a59678 (diff) | |
download | Qt-206c9ba930095efb6d569f6e61a9809f16361dd5.zip Qt-206c9ba930095efb6d569f6e61a9809f16361dd5.tar.gz Qt-206c9ba930095efb6d569f6e61a9809f16361dd5.tar.bz2 |
Don't leak MouseEvents
Based off merge request 1312
Reviewed-by: Michael Brasser
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 84674a5..b6e2f90 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -1442,9 +1442,9 @@ bool QLineControl::processEvent(QEvent* ev) case QEvent::GraphicsSceneMouseRelease: case QEvent::GraphicsSceneMousePress:{ QGraphicsSceneMouseEvent *gvEv = static_cast<QGraphicsSceneMouseEvent*>(ev); - QMouseEvent* mouse = new QMouseEvent(ev->type(), + QMouseEvent mouse(ev->type(), gvEv->pos().toPoint(), gvEv->button(), gvEv->buttons(), gvEv->modifiers()); - processMouseEvent(mouse); break; + processMouseEvent(&mouse); break; } #endif case QEvent::MouseButtonPress: |