summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-09-26 15:39:35 +0200
committerLiang Qi <liang.qi@qt.io>2018-10-12 14:26:15 +0000
commitc593492d1678a2ec08f1bfffcb572459b3bc6c00 (patch)
treea9427b13e0f3aa252d68decc862de5acb4dc3b17 /src/corelib/animation
parent0509383cf2852f2aebd1efd75413835747c8f341 (diff)
Modernize the "animation" feature
Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp4
-rw-r--r--src/corelib/animation/qabstractanimation.h10
-rw-r--r--src/corelib/animation/qabstractanimation_p.h4
-rw-r--r--src/corelib/animation/qanimationgroup.cpp4
-rw-r--r--src/corelib/animation/qanimationgroup.h7
-rw-r--r--src/corelib/animation/qanimationgroup_p.h4
-rw-r--r--src/corelib/animation/qparallelanimationgroup.cpp4
-rw-r--r--src/corelib/animation/qparallelanimationgroup.h7
-rw-r--r--src/corelib/animation/qparallelanimationgroup_p.h4
-rw-r--r--src/corelib/animation/qpauseanimation.cpp5
-rw-r--r--src/corelib/animation/qpauseanimation.h7
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp4
-rw-r--r--src/corelib/animation/qpropertyanimation.h7
-rw-r--r--src/corelib/animation/qpropertyanimation_p.h4
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp4
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.h7
-rw-r--r--src/corelib/animation/qsequentialanimationgroup_p.h4
-rw-r--r--src/corelib/animation/qvariantanimation.cpp4
-rw-r--r--src/corelib/animation/qvariantanimation.h7
-rw-r--r--src/corelib/animation/qvariantanimation_p.h4
20 files changed, 20 insertions, 85 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index b3db200ed1..4d7ce038dd 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -153,8 +153,6 @@
#include <QtCore/qcoreevent.h>
#include <QtCore/qpointer.h>
-#ifndef QT_NO_ANIMATION
-
#define DEFAULT_TIMER_INTERVAL 16
#define PAUSE_TIMER_COARSE_THRESHOLD 2000
@@ -1485,5 +1483,3 @@ QT_END_NAMESPACE
#include "moc_qabstractanimation.cpp"
#include "moc_qabstractanimation_p.cpp"
-
-#endif //QT_NO_ANIMATION
diff --git a/src/corelib/animation/qabstractanimation.h b/src/corelib/animation/qabstractanimation.h
index 0ff6bc5176..25b5726d56 100644
--- a/src/corelib/animation/qabstractanimation.h
+++ b/src/corelib/animation/qabstractanimation.h
@@ -42,10 +42,9 @@
#include <QtCore/qobject.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(animation);
-#ifndef QT_NO_ANIMATION
+QT_BEGIN_NAMESPACE
class QAnimationGroup;
class QSequentialAnimationGroup;
@@ -169,11 +168,6 @@ private:
};
-
-
-
-#endif //QT_NO_ANIMATION
-
QT_END_NAMESPACE
#endif // QABSTRACTANIMATION_H
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 5593046e48..3b6e8d6cc4 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -58,7 +58,7 @@
#include <private/qobject_p.h>
#include <qabstractanimation.h>
-#ifndef QT_NO_ANIMATION
+QT_REQUIRE_CONFIG(animation);
QT_BEGIN_NAMESPACE
@@ -296,6 +296,4 @@ private:
QT_END_NAMESPACE
-#endif //QT_NO_ANIMATION
-
#endif //QABSTRACTANIMATION_P_H
diff --git a/src/corelib/animation/qanimationgroup.cpp b/src/corelib/animation/qanimationgroup.cpp
index 486dc149ea..f47d99eb68 100644
--- a/src/corelib/animation/qanimationgroup.cpp
+++ b/src/corelib/animation/qanimationgroup.cpp
@@ -86,8 +86,6 @@
#include <QtCore/qcoreevent.h>
#include "qanimationgroup_p.h"
-#ifndef QT_NO_ANIMATION
-
#include <algorithm>
QT_BEGIN_NAMESPACE
@@ -300,5 +298,3 @@ void QAnimationGroupPrivate::animationRemoved(int index, QAbstractAnimation *)
QT_END_NAMESPACE
#include "moc_qanimationgroup.cpp"
-
-#endif //QT_NO_ANIMATION
diff --git a/src/corelib/animation/qanimationgroup.h b/src/corelib/animation/qanimationgroup.h
index 136ad3ca9f..7c7666f251 100644
--- a/src/corelib/animation/qanimationgroup.h
+++ b/src/corelib/animation/qanimationgroup.h
@@ -42,10 +42,9 @@
#include <QtCore/qabstractanimation.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(animation);
-#ifndef QT_NO_ANIMATION
+QT_BEGIN_NAMESPACE
class QAnimationGroupPrivate;
class Q_CORE_EXPORT QAnimationGroup : public QAbstractAnimation
@@ -74,8 +73,6 @@ private:
Q_DECLARE_PRIVATE(QAnimationGroup)
};
-#endif //QT_NO_ANIMATION
-
QT_END_NAMESPACE
#endif //QANIMATIONGROUP_H
diff --git a/src/corelib/animation/qanimationgroup_p.h b/src/corelib/animation/qanimationgroup_p.h
index 31c2cd08e8..ff759d11fd 100644
--- a/src/corelib/animation/qanimationgroup_p.h
+++ b/src/corelib/animation/qanimationgroup_p.h
@@ -57,7 +57,7 @@
#include "private/qabstractanimation_p.h"
-#ifndef QT_NO_ANIMATION
+QT_REQUIRE_CONFIG(animation);
QT_BEGIN_NAMESPACE
@@ -89,6 +89,4 @@ public:
QT_END_NAMESPACE
-#endif //QT_NO_ANIMATION
-
#endif //QANIMATIONGROUP_P_H
diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp
index e4dfc1bd6e..1dcf006dd3 100644
--- a/src/corelib/animation/qparallelanimationgroup.cpp
+++ b/src/corelib/animation/qparallelanimationgroup.cpp
@@ -72,8 +72,6 @@
#include "qparallelanimationgroup_p.h"
//#define QANIMATION_DEBUG
-#ifndef QT_NO_ANIMATION
-
QT_BEGIN_NAMESPACE
typedef QList<QAbstractAnimation *>::ConstIterator AnimationListConstIt;
@@ -339,5 +337,3 @@ bool QParallelAnimationGroup::event(QEvent *event)
QT_END_NAMESPACE
#include "moc_qparallelanimationgroup.cpp"
-
-#endif //QT_NO_ANIMATION
diff --git a/src/corelib/animation/qparallelanimationgroup.h b/src/corelib/animation/qparallelanimationgroup.h
index 09a439ef24..683d933861 100644
--- a/src/corelib/animation/qparallelanimationgroup.h
+++ b/src/corelib/animation/qparallelanimationgroup.h
@@ -42,10 +42,9 @@
#include <QtCore/qanimationgroup.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(animation);
-#ifndef QT_NO_ANIMATION
+QT_BEGIN_NAMESPACE
class QParallelAnimationGroupPrivate;
class Q_CORE_EXPORT QParallelAnimationGroup : public QAnimationGroup
@@ -72,8 +71,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_uncontrolledAnimationFinished())
};
-#endif //QT_NO_ANIMATION
-
QT_END_NAMESPACE
#endif // QPARALLELANIMATIONGROUP
diff --git a/src/corelib/animation/qparallelanimationgroup_p.h b/src/corelib/animation/qparallelanimationgroup_p.h
index 1c9c3072f7..fc8f809d5a 100644
--- a/src/corelib/animation/qparallelanimationgroup_p.h
+++ b/src/corelib/animation/qparallelanimationgroup_p.h
@@ -55,7 +55,7 @@
#include "private/qanimationgroup_p.h"
#include <QtCore/qhash.h>
-#ifndef QT_NO_ANIMATION
+QT_REQUIRE_CONFIG(animation);
QT_BEGIN_NAMESPACE
@@ -86,6 +86,4 @@ public:
QT_END_NAMESPACE
-#endif //QT_NO_ANIMATION
-
#endif //QPARALLELANIMATIONGROUP_P_H
diff --git a/src/corelib/animation/qpauseanimation.cpp b/src/corelib/animation/qpauseanimation.cpp
index 654ba701da..5f8a8b3590 100644
--- a/src/corelib/animation/qpauseanimation.cpp
+++ b/src/corelib/animation/qpauseanimation.cpp
@@ -64,9 +64,6 @@
#include "qpauseanimation.h"
#include "qabstractanimation_p.h"
-
-#ifndef QT_NO_ANIMATION
-
QT_BEGIN_NAMESPACE
class QPauseAnimationPrivate : public QAbstractAnimationPrivate
@@ -150,5 +147,3 @@ void QPauseAnimation::updateCurrentTime(int)
QT_END_NAMESPACE
#include "moc_qpauseanimation.cpp"
-
-#endif //QT_NO_ANIMATION
diff --git a/src/corelib/animation/qpauseanimation.h b/src/corelib/animation/qpauseanimation.h
index e2095a39d6..6bdbeefdbd 100644
--- a/src/corelib/animation/qpauseanimation.h
+++ b/src/corelib/animation/qpauseanimation.h
@@ -42,10 +42,9 @@
#include <QtCore/qanimationgroup.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(animation);
-#ifndef QT_NO_ANIMATION
+QT_BEGIN_NAMESPACE
class QPauseAnimationPrivate;
@@ -70,8 +69,6 @@ private:
Q_DECLARE_PRIVATE(QPauseAnimation)
};
-#endif //QT_NO_ANIMATION
-
QT_END_NAMESPACE
#endif // QPAUSEANIMATION_H
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 5ba2a1fa73..174121516b 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -93,8 +93,6 @@
#include <QtCore/QMutex>
-#ifndef QT_NO_ANIMATION
-
QT_BEGIN_NAMESPACE
void QPropertyAnimationPrivate::updateMetaProperty()
@@ -315,5 +313,3 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
#include "moc_qpropertyanimation.cpp"
QT_END_NAMESPACE
-
-#endif //QT_NO_ANIMATION
diff --git a/src/corelib/animation/qpropertyanimation.h b/src/corelib/animation/qpropertyanimation.h
index 3270591d1d..a1caafcad5 100644
--- a/src/corelib/animation/qpropertyanimation.h
+++ b/src/corelib/animation/qpropertyanimation.h
@@ -42,10 +42,9 @@
#include <QtCore/qvariantanimation.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(animation);
-#ifndef QT_NO_ANIMATION
+QT_BEGIN_NAMESPACE
class QPropertyAnimationPrivate;
class Q_CORE_EXPORT QPropertyAnimation : public QVariantAnimation
@@ -75,8 +74,6 @@ private:
Q_DECLARE_PRIVATE(QPropertyAnimation)
};
-#endif //QT_NO_ANIMATION
-
QT_END_NAMESPACE
#endif // QPROPERTYANIMATION_H
diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h
index cfb1f247e0..479762f573 100644
--- a/src/corelib/animation/qpropertyanimation_p.h
+++ b/src/corelib/animation/qpropertyanimation_p.h
@@ -55,7 +55,7 @@
#include "private/qvariantanimation_p.h"
-#ifndef QT_NO_ANIMATION
+QT_REQUIRE_CONFIG(animation);
QT_BEGIN_NAMESPACE
@@ -83,6 +83,4 @@ public:
QT_END_NAMESPACE
-#endif //QT_NO_ANIMATION
-
#endif //QPROPERTYANIMATION_P_H
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index f5f538337e..8af6b33722 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -83,8 +83,6 @@
#include <QtCore/qdebug.h>
-#ifndef QT_NO_ANIMATION
-
QT_BEGIN_NAMESPACE
typedef QList<QAbstractAnimation *>::ConstIterator AnimationListConstIt;
@@ -582,5 +580,3 @@ void QSequentialAnimationGroupPrivate::animationRemoved(int index, QAbstractAnim
QT_END_NAMESPACE
#include "moc_qsequentialanimationgroup.cpp"
-
-#endif //QT_NO_ANIMATION
diff --git a/src/corelib/animation/qsequentialanimationgroup.h b/src/corelib/animation/qsequentialanimationgroup.h
index 1c8e67d256..a33ff07abf 100644
--- a/src/corelib/animation/qsequentialanimationgroup.h
+++ b/src/corelib/animation/qsequentialanimationgroup.h
@@ -42,10 +42,9 @@
#include <QtCore/qanimationgroup.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(animation);
-#ifndef QT_NO_ANIMATION
+QT_BEGIN_NAMESPACE
class QPauseAnimation;
class QSequentialAnimationGroupPrivate;
@@ -82,8 +81,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_uncontrolledAnimationFinished())
};
-#endif //QT_NO_ANIMATION
-
QT_END_NAMESPACE
#endif //QSEQUENTIALANIMATIONGROUP_H
diff --git a/src/corelib/animation/qsequentialanimationgroup_p.h b/src/corelib/animation/qsequentialanimationgroup_p.h
index e4f3d9c96a..88dac4f566 100644
--- a/src/corelib/animation/qsequentialanimationgroup_p.h
+++ b/src/corelib/animation/qsequentialanimationgroup_p.h
@@ -54,7 +54,7 @@
#include "qsequentialanimationgroup.h"
#include "private/qanimationgroup_p.h"
-#ifndef QT_NO_ANIMATION
+QT_REQUIRE_CONFIG(animation);
QT_BEGIN_NAMESPACE
@@ -107,6 +107,4 @@ public:
QT_END_NAMESPACE
-#endif //QT_NO_ANIMATION
-
#endif //QSEQUENTIALANIMATIONGROUP_P_H
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index 3c90d71c7d..df533c5f4d 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -46,8 +46,6 @@
#include <algorithm>
-#ifndef QT_NO_ANIMATION
-
QT_BEGIN_NAMESPACE
/*!
@@ -700,5 +698,3 @@ void QVariantAnimation::updateCurrentTime(int)
QT_END_NAMESPACE
#include "moc_qvariantanimation.cpp"
-
-#endif //QT_NO_ANIMATION
diff --git a/src/corelib/animation/qvariantanimation.h b/src/corelib/animation/qvariantanimation.h
index d6346e1706..e47fa14b1c 100644
--- a/src/corelib/animation/qvariantanimation.h
+++ b/src/corelib/animation/qvariantanimation.h
@@ -46,10 +46,9 @@
#include <QtCore/qvariant.h>
#include <QtCore/qpair.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(animation);
-#ifndef QT_NO_ANIMATION
+QT_BEGIN_NAMESPACE
class QVariantAnimationPrivate;
class Q_CORE_EXPORT QVariantAnimation : public QAbstractAnimation
@@ -116,8 +115,6 @@ void qRegisterAnimationInterpolator(QVariant (*func)(const T &from, const T &to,
QVariantAnimation::registerInterpolator(reinterpret_cast<QVariantAnimation::Interpolator>(reinterpret_cast<void(*)()>(func)), qMetaTypeId<T>());
}
-#endif //QT_NO_ANIMATION
-
QT_END_NAMESPACE
#endif //QVARIANTANIMATION_H
diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h
index 9f0f2e3030..57b59cf876 100644
--- a/src/corelib/animation/qvariantanimation_p.h
+++ b/src/corelib/animation/qvariantanimation_p.h
@@ -60,7 +60,7 @@
#include <type_traits>
-#ifndef QT_NO_ANIMATION
+QT_REQUIRE_CONFIG(animation);
QT_BEGIN_NAMESPACE
@@ -129,6 +129,4 @@ template<typename T > inline QVariant _q_interpolateVariant(const T &from, const
QT_END_NAMESPACE
-#endif //QT_NO_ANIMATION
-
#endif //QVARIANTANIMATION_P_H