summaryrefslogtreecommitdiffstats
path: root/src/animation/frontend/qclipanimator.cpp
diff options
context:
space:
mode:
authorJuan Jose Casafranca <juan.casafranca@kdab.com>2018-07-03 11:48:48 +0200
committerJuan José Casafranca <juan.casafranca@kdab.com>2018-07-05 21:26:53 +0000
commitb59d191cb707f558d17e87c6388fccf0c6c19995 (patch)
tree791f59a52eecdb7046fdd74094a23e5fb3a7668c /src/animation/frontend/qclipanimator.cpp
parent9d5fa0e89d4948897b0b9d501b0d1c7690f5f07e (diff)
Check animator can be played in frontend and backend
We check that the animator can be played in the frontend. Each animator subclass must implement their own canPlay method. In the backend we correctly check the clipAnimator can be played Change-Id: Idf48f0e3263c426c8806ac4b11f6262a38920fd7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/animation/frontend/qclipanimator.cpp')
-rw-r--r--src/animation/frontend/qclipanimator.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/animation/frontend/qclipanimator.cpp b/src/animation/frontend/qclipanimator.cpp
index c14715494..398758820 100644
--- a/src/animation/frontend/qclipanimator.cpp
+++ b/src/animation/frontend/qclipanimator.cpp
@@ -53,6 +53,15 @@ QClipAnimatorPrivate::QClipAnimatorPrivate()
{
}
+bool QClipAnimatorPrivate::canPlay() const
+{
+ if (m_clip && m_mapper)
+ return true;
+
+ qWarning("ClipAnimators need a clip and a mapper to be played");
+ return false;
+}
+
/*!
\qmltype ClipAnimator
\instantiates Qt3DAnimation::QClipAnimator