QScrollerPrivate: fix some const-incorrectnesses
Change-Id: Iad7ea926b90efa54ef94c04ac78e38254d9b5c98 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
parent
46ed6c058a
commit
a1bb00bece
@ -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<ScrollSegment> *segments;
|
||||
const QQueue<ScrollSegment> *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;
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QPointF QScrollerPrivate::realDpi(int screen)
|
||||
QPointF QScrollerPrivate::realDpi(int screen) const
|
||||
{
|
||||
QMacAutoReleasePool pool;
|
||||
NSArray *nsscreens = [NSScreen screens];
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
bool prepareScrolling(const QPointF &position);
|
||||
void handleDrag(const QPointF &position, qint64 timestamp);
|
||||
|
||||
QPointF realDpi(int screen);
|
||||
QPointF realDpi(int screen) const;
|
||||
QPointF dpi() const;
|
||||
void setDpi(const QPointF &dpi);
|
||||
void setDpiFromWidget(QWidget *widget);
|
||||
@ -121,7 +121,7 @@ public:
|
||||
void pushSegment(ScrollType type, qreal deltaTime, qreal stopProgress, qreal startPos, qreal deltaPos, qreal stopPos, QEasingCurve::Type curve, Qt::Orientation orientation);
|
||||
void recalcScrollingSegments(bool forceRecalc = false);
|
||||
qreal scrollingSegmentsEndPos(Qt::Orientation orientation) const;
|
||||
bool scrollingSegmentsValid(Qt::Orientation orientation);
|
||||
bool scrollingSegmentsValid(Qt::Orientation orientation) const;
|
||||
void createScrollToSegments(qreal v, qreal deltaTime, qreal endPos, Qt::Orientation orientation, ScrollType type);
|
||||
void createScrollingSegments(qreal v, qreal startPos,
|
||||
qreal deltaTime, qreal deltaPos,
|
||||
@ -131,7 +131,7 @@ public:
|
||||
void setContentPositionHelperDragging(const QPointF &deltaPos);
|
||||
void setContentPositionHelperScrolling();
|
||||
|
||||
qreal nextSnapPos(qreal p, int dir, Qt::Orientation orientation);
|
||||
qreal nextSnapPos(qreal p, int dir, Qt::Orientation orientation) const;
|
||||
static qreal nextSegmentPosition(QQueue<ScrollSegment> &segments, qint64 now, qreal oldPos);
|
||||
|
||||
inline int frameRateSkip() const { return properties.d.data()->frameRate; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user