From a1bb00becec04bfb4d775cd8056b6894f4eef198 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 16 Dec 2015 01:59:15 +0100 Subject: QScrollerPrivate: fix some const-incorrectnesses Change-Id: Iad7ea926b90efa54ef94c04ac78e38254d9b5c98 Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Friedemann Kleint --- src/widgets/util/qscroller.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widgets/util/qscroller.cpp') diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp index bc7c11127e..5297c949a9 100644 --- a/src/widgets/util/qscroller.cpp +++ b/src/widgets/util/qscroller.cpp @@ -1005,7 +1005,7 @@ bool QScroller::handleInput(Input input, const QPointF &position, qint64 timesta #if !defined(Q_DEAD_CODE_FROM_QT4_MAC) // the Mac version is implemented in qscroller_mac.mm -QPointF QScrollerPrivate::realDpi(int screen) +QPointF QScrollerPrivate::realDpi(int screen) const { # if defined(Q_DEAD_CODE_FROM_QT4_X11) && !defined(QT_NO_XRANDR) if (X11 && X11->use_xrandr && X11->ptrXRRSizes && X11->ptrXRRRootToScreen) { @@ -1176,9 +1176,9 @@ qreal QScrollerPrivate::scrollingSegmentsEndPos(Qt::Orientation orientation) con /*! \internal Checks if the scroller segment end in a valid position. */ -bool QScrollerPrivate::scrollingSegmentsValid(Qt::Orientation orientation) +bool QScrollerPrivate::scrollingSegmentsValid(Qt::Orientation orientation) const { - QQueue *segments; + const QQueue *segments; qreal minPos; qreal maxPos; @@ -1893,7 +1893,7 @@ void QScrollerPrivate::setContentPositionHelperScrolling() on a snap point. Returns the nearest snap position or NaN if no such point could be found. */ -qreal QScrollerPrivate::nextSnapPos(qreal p, int dir, Qt::Orientation orientation) +qreal QScrollerPrivate::nextSnapPos(qreal p, int dir, Qt::Orientation orientation) const { qreal bestSnapPos = Q_QNAN; qreal bestSnapPosDist = Q_INFINITY; -- cgit v1.2.3