From 7af329fdf2ab25c38858fed8bb33e4fa0200766f Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Tue, 2 Sep 2014 22:53:35 +0300 Subject: Widgets: remove pointless assignments Assignment of a value was two times successively for same variable while the variable itself is not used between these assignments. Change-Id: I3c457e3af0505d32a64f6c8576b458cd15a951e5 Reviewed-by: Friedemann Kleint Reviewed-by: Marc Mutz --- src/widgets/util/qscroller.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/widgets/util/qscroller.cpp') diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp index 235cbc7865..abbba87039 100644 --- a/src/widgets/util/qscroller.cpp +++ b/src/widgets/util/qscroller.cpp @@ -746,9 +746,8 @@ void QScroller::ensureVisible(const QRectF &rect, qreal xmargin, qreal ymargin, return; // -- calculate the current pos (or the position after the current scroll) - QPointF startPos = d->contentPosition + d->overshootPosition; - startPos = QPointF(d->scrollingSegmentsEndPos(Qt::Horizontal), - d->scrollingSegmentsEndPos(Qt::Vertical)); + QPointF startPos(d->scrollingSegmentsEndPos(Qt::Horizontal), + d->scrollingSegmentsEndPos(Qt::Vertical)); QRectF marginRect(rect.x() - xmargin, rect.y() - ymargin, rect.width() + 2 * xmargin, rect.height() + 2 * ymargin); -- cgit v1.2.3