From 137906da8e745a96c64c8120d25ff8845d82fcda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= Date: Mon, 3 Dec 2012 21:49:54 +0100 Subject: QGraphicsView - remove not needed storeMouseEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updateRubberBand is only called from mouseMoveEvent. The event is not changed. At the end of the event we call d->mouseMoveEventHandler which calls storeMouseEvent. There is no need to call it twice. Beside that this patch also changes the argument from QMouseEvent* to const QMouseEvent*. The only reason it needed to be const was the call to storeMouseEvent. Change-Id: I01148a6a8d36e782c4d95a90e36435e20b1681e1 Reviewed-by: Andreas Aardal Hanssen Reviewed-by: Samuel Rødal --- src/widgets/graphicsview/qgraphicsview_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/graphicsview/qgraphicsview_p.h') diff --git a/src/widgets/graphicsview/qgraphicsview_p.h b/src/widgets/graphicsview/qgraphicsview_p.h index 9f0e3e3b24..d8654ff10f 100644 --- a/src/widgets/graphicsview/qgraphicsview_p.h +++ b/src/widgets/graphicsview/qgraphicsview_p.h @@ -138,7 +138,7 @@ public: #ifndef QT_NO_RUBBERBAND QRect rubberBandRect; QRegion rubberBandRegion(const QWidget *widget, const QRect &rect) const; - void updateRubberBand(QMouseEvent *event); + void updateRubberBand(const QMouseEvent *event); bool rubberBanding; Qt::ItemSelectionMode rubberBandSelectionMode; #endif -- cgit v1.2.3