aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/animations/qabstractanimationjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/animations/qabstractanimationjob.cpp')
-rw-r--r--src/qml/animations/qabstractanimationjob.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/qml/animations/qabstractanimationjob.cpp b/src/qml/animations/qabstractanimationjob.cpp
index b6222a541c..0928c0efc1 100644
--- a/src/qml/animations/qabstractanimationjob.cpp
+++ b/src/qml/animations/qabstractanimationjob.cpp
@@ -45,6 +45,7 @@
#include "private/qanimationgroupjob_p.h"
#include "private/qanimationjobutil_p.h"
#include "private/qqmlengine_p.h"
+#include "private/qqmlglobal_p.h"
#define DEFAULT_TIMER_INTERVAL 16
@@ -54,6 +55,8 @@ QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QThreadStorage<QQmlAnimationTimer *>, animationTimer)
#endif
+DEFINE_BOOL_CONFIG_OPTION(animationTickDump, QML_ANIMATION_TICK_DUMP);
+
QAnimationJobChangeListener::~QAnimationJobChangeListener()
{
}
@@ -115,6 +118,11 @@ void QQmlAnimationTimer::updateAnimationsTime(qint64 delta)
+ (animation->direction() == QAbstractAnimationJob::Forward ? delta : -delta);
animation->setCurrentTime(elapsed);
}
+ if (animationTickDump()) {
+ qDebug() << "***** Dumping Animation Tree ***** ( tick:" << lastTick << "delta:" << delta << ")";
+ for (int i = 0; i < animations.count(); ++i)
+ qDebug() << animations.at(i);
+ }
insideTick = false;
currentAnimationIdx = 0;
}
@@ -647,6 +655,21 @@ void QAbstractAnimationJob::removeAnimationChangeListener(QAnimationJobChangeLis
}
}
+void QAbstractAnimationJob::debugAnimation(QDebug d) const
+{
+ d << "AbstractAnimationJob(" << hex << (void *) this << dec << ")" << "duration:" << duration();
+}
+
+QDebug operator<<(QDebug d, const QAbstractAnimationJob *job)
+{
+ if (!job) {
+ d << "AbstractAnimationJob(null)";
+ return d;
+ }
+ job->debugAnimation(d);
+ return d;
+}
+
QT_END_NAMESPACE
//#include "moc_qabstractanimation2_p.cpp"