summaryrefslogtreecommitdiffstats
path: root/src/widgets/util/qscroller.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-10-17 10:35:28 +0200
committerLiang Qi <liang.qi@qt.io>2018-10-17 10:35:28 +0200
commitccf26f6a88e116abdf8e53acdc02dbd98a4a8dc4 (patch)
tree40aaca99471edc709d38e6f82153576bad86747f /src/widgets/util/qscroller.cpp
parent8ff1ae89bfa32c586e3b44b71dfc49d294a3e043 (diff)
parent3eebadc1734463afa469dcd08eab8c5d2557dec6 (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
Diffstat (limited to 'src/widgets/util/qscroller.cpp')
-rw-r--r--src/widgets/util/qscroller.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp
index 386fc0d103..e229a885a8 100644
--- a/src/widgets/util/qscroller.cpp
+++ b/src/widgets/util/qscroller.cpp
@@ -191,7 +191,7 @@ static qreal progressForValue(const QEasingCurve &curve, qreal value)
}
-#ifndef QT_NO_ANIMATION
+#if QT_CONFIG(animation)
class QScrollTimer : public QAbstractAnimation
{
public:
@@ -230,7 +230,7 @@ private:
bool ignoreUpdate;
int skip;
};
-#endif // QT_NO_ANIMATION
+#endif // animation
/*!
\class QScroller
@@ -889,7 +889,7 @@ QScrollerPrivate::QScrollerPrivate(QScroller *q, QObject *_target)
, snapIntervalX(0.0)
, snapFirstY(-1.0)
, snapIntervalY(0.0)
-#ifndef QT_NO_ANIMATION
+#if QT_CONFIG(animation)
, scrollTimer(new QScrollTimer(this))
#endif
, q_ptr(q)
@@ -931,7 +931,7 @@ const char *QScrollerPrivate::inputName(QScroller::Input input)
void QScrollerPrivate::targetDestroyed()
{
-#ifndef QT_NO_ANIMATION
+#if QT_CONFIG(animation)
scrollTimer->stop();
#endif
delete q_ptr;
@@ -959,7 +959,7 @@ void QScrollerPrivate::timerTick()
}
}
-#ifndef QT_NO_ANIMATION
+#if QT_CONFIG(animation)
scrollTimer->stop();
#endif
}
@@ -1683,7 +1683,7 @@ void QScrollerPrivate::setState(QScroller::State newstate)
switch (newstate) {
case QScroller::Inactive:
-#ifndef QT_NO_ANIMATION
+#if QT_CONFIG(animation)
scrollTimer->stop();
#endif
@@ -1695,7 +1695,7 @@ void QScrollerPrivate::setState(QScroller::State newstate)
break;
case QScroller::Pressed:
-#ifndef QT_NO_ANIMATION
+#if QT_CONFIG(animation)
scrollTimer->stop();
#endif
@@ -1705,14 +1705,14 @@ void QScrollerPrivate::setState(QScroller::State newstate)
case QScroller::Dragging:
dragDistance = QPointF(0, 0);
-#ifndef QT_NO_ANIMATION
+#if QT_CONFIG(animation)
if (state == QScroller::Pressed)
scrollTimer->start();
#endif
break;
case QScroller::Scrolling:
-#ifndef QT_NO_ANIMATION
+#if QT_CONFIG(animation)
scrollTimer->start();
#endif
break;