Don't leak MouseEvents
Based off merge request 1312 Reviewed-by: Michael Brasser (cherry picked from commit 206c9ba930095efb6d569f6e61a9809f16361dd5) Change-Id: Iaaaabadbadbadaaaaaaaaaffaaaeaaaaaaaacaaa Reviewed-on: http://codereview.qt.nokia.com/2843 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
This commit is contained in:
parent
bf7ca774bd
commit
81b559631a
@ -1449,9 +1449,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:
|
||||
|
Loading…
Reference in New Issue
Block a user