summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-07-16 13:14:43 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-08-28 21:21:09 +0200
commit072fb7de513c5359fc3a3b7da23e3a6fe6c58bf7 (patch)
tree31c6bc53925b4c558ec365fd1bf35e5c4c664170
parent039c2f7a4b326b79e078fca81eed6dedb421c854 (diff)
Remove QTimeLine's curveShape
Deprecated in 5.15.1, removed in Qt 6. It is entirely redundant with easingCurve, which has been there since 4.6. Task-number: QTBUG-85520 Change-Id: Ib1daa322a17da390dd264ed8d48ac572138a5d84 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--src/corelib/tools/qtimeline.cpp82
-rw-r--r--src/corelib/tools/qtimeline.h20
2 files changed, 1 insertions, 101 deletions
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index 670347b9ac..f8e78170c4 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -250,24 +250,6 @@ void QTimeLinePrivate::setCurrentTime(int msecs)
*/
/*!
- \enum QTimeLine::CurveShape
- \obsolete use QEasingCurve instead
-
- This enum describes the shape of QTimeLine's value curve. The default shape
- is EaseInOutCurve. The curve defines the relation between the value and the
- timeline.
-
- \value EaseInCurve Obsolete equivalent of QEasingCurve::InCurve
- \value EaseOutCurve Obsolete equivalent of QEasingCurve::OutCurve
- \value EaseInOutCurve Obsolete equivalent of QEasingCurve::InOutSine
- \value LinearCurve Obsolete equivalent of QEasingCurve::Linear
- \value SineCurve Obsolete equivalent of QEasingCurve::SineCurve
- \value CosineCurve Obsolete equivalent of QEasingCurve::CosineCurve
-
- \sa curveShape, setCurveShape(), easingCurve, QEasingCurve
-*/
-
-/*!
\fn void QTimeLine::valueChanged(qreal value)
QTimeLine emits this signal at regular intervals when in \l Running state,
@@ -491,66 +473,6 @@ void QTimeLine::setUpdateInterval(int interval)
d->updateInterval = interval;
}
-#if QT_DEPRECATED_SINCE(5, 15)
-/*!
- \property QTimeLine::curveShape
- \brief the shape of the timeline curve.
-
- The curve shape describes the relation between the time and value for the
- base implementation of valueForTime().
-
- This property is an indirect way to update the easingCurve property; if you
- set both, the one set more recently overrides the other. (If valueForTime()
- is reimplemented it will override both.)
-
- By default, this property is set to \l EaseInOutCurve.
-
- \obsolete Access \c easingCurve instead.
-
- \sa valueForTime(), easingCurve
-*/
-QTimeLine::CurveShape QTimeLine::curveShape() const
-{
- Q_D(const QTimeLine);
- switch (d->easingCurve.type()) {
- default:
- case QEasingCurve::InOutSine:
- return EaseInOutCurve;
- case QEasingCurve::InCurve:
- return EaseInCurve;
- case QEasingCurve::OutCurve:
- return EaseOutCurve;
- case QEasingCurve::Linear:
- return LinearCurve;
- case QEasingCurve::SineCurve:
- return SineCurve;
- case QEasingCurve::CosineCurve:
- return CosineCurve;
- }
- return EaseInOutCurve;
-}
-
-static QEasingCurve::Type convert(QTimeLine::CurveShape shape)
-{
- switch (shape) {
-#define CASE(x, y) case QTimeLine::x: return QEasingCurve::y
- CASE(EaseInOutCurve, InOutSine);
- CASE(EaseInCurve, InCurve);
- CASE(EaseOutCurve, OutCurve);
- CASE(LinearCurve, Linear);
- CASE(SineCurve, SineCurve);
- CASE(CosineCurve, CosineCurve);
-#undef CASE
- }
- Q_UNREACHABLE();
-}
-
-void QTimeLine::setCurveShape(CurveShape shape)
-{
- setEasingCurve(convert(shape));
-}
-#endif // 5.15 deprecation
-
/*!
\property QTimeLine::easingCurve
@@ -558,8 +480,6 @@ void QTimeLine::setCurveShape(CurveShape shape)
Specifies the easing curve that the timeline will use.
If valueForTime() is reimplemented, this value is ignored.
- If both easingCurve and curveShape are set, the last property set will
- override the previous one.
\sa valueForTime()
*/
@@ -646,7 +566,7 @@ int QTimeLine::frameForTime(int msec) const
Reimplement this function to provide a custom curve shape for your
timeline.
- \sa CurveShape, frameForTime()
+ \sa easingCurve, frameForTime()
*/
qreal QTimeLine::valueForTime(int msec) const
{
diff --git a/src/corelib/tools/qtimeline.h b/src/corelib/tools/qtimeline.h
index b5f691769b..193c372c6a 100644
--- a/src/corelib/tools/qtimeline.h
+++ b/src/corelib/tools/qtimeline.h
@@ -59,9 +59,6 @@ class Q_CORE_EXPORT QTimeLine : public QObject
Q_PROPERTY(int currentTime READ currentTime WRITE setCurrentTime)
Q_PROPERTY(Direction direction READ direction WRITE setDirection)
Q_PROPERTY(int loopCount READ loopCount WRITE setLoopCount)
-#if QT_DEPRECATED_SINCE(5, 15)
- Q_PROPERTY(CurveShape curveShape READ curveShape WRITE setCurveShape)
-#endif
Q_PROPERTY(QEasingCurve easingCurve READ easingCurve WRITE setEasingCurve)
public:
enum State {
@@ -73,16 +70,6 @@ public:
Forward,
Backward
};
-#if QT_DEPRECATED_SINCE(5, 15)
- enum CurveShape {
- EaseInCurve,
- EaseOutCurve,
- EaseInOutCurve,
- LinearCurve,
- SineCurve,
- CosineCurve
- };
-#endif
explicit QTimeLine(int duration = 1000, QObject *parent = nullptr);
virtual ~QTimeLine();
@@ -107,13 +94,6 @@ public:
int updateInterval() const;
void setUpdateInterval(int interval);
-#if QT_DEPRECATED_SINCE(5, 15)
- QT_DEPRECATED_X("Access easingCurve directly")
- CurveShape curveShape() const;
- QT_DEPRECATED_X("Access easingCurve directly")
- void setCurveShape(CurveShape shape);
-#endif
-
QEasingCurve easingCurve() const;
void setEasingCurve(const QEasingCurve &curve);