From 7a7d9628f307706238e9043c053472a5575c3b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= Date: Tue, 11 Dec 2012 06:42:28 +0100 Subject: [PATCH] QGraphicsView - remove reference to avoid weird code. Even though the code before theoretic is ok, we really shouldn't have a reference since mapFromScene returns a QPointF and not a const QPointF&. Change-Id: I5ea8fd238bdbdd21fb1e3b6b5f280d45e3bc43ef Reviewed-by: Andy Shaw Reviewed-by: Marc Mutz --- src/widgets/graphicsview/qgraphicsview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index 2012f980db..411297edd3 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -3238,7 +3238,7 @@ void QGraphicsView::mouseMoveEvent(QMouseEvent *event) } // Update rubberband position - const QPoint &mp = mapFromScene(d->mousePressScenePoint); + const QPoint mp = mapFromScene(d->mousePressScenePoint); QPoint ep = event->pos(); d->rubberBandRect = QRect(qMin(mp.x(), ep.x()), qMin(mp.y(), ep.y()), qAbs(mp.x() - ep.x()) + 1, qAbs(mp.y() - ep.y()) + 1);