diff options
author | Christian Stromme <christian.stromme@qt.io> | 2017-11-26 15:56:26 +0100 |
---|---|---|
committer | Christian Stromme <christian.stromme@qt.io> | 2017-12-01 12:48:44 +0000 |
commit | 9e35f9e4beafdea9c6dd0b88496198cd7590a566 (patch) | |
tree | c490963b987f4ed2de9d16f3823fc57cd7aa0e5f /src/animation/frontend/qclipanimator.cpp | |
parent | 239d3cac8aa3558f3ac889b8a348ab0c5e18df06 (diff) |
Move animation callback handling to QAbstractClipAnimator
The code that triggers the callbacks on the GUI thread should be the used
for all clip animators, and not just the QClipAnimator.
This change also fixes the scene change event handler to call the parent
implementation for all events not handled by the clip animator, so it
doesn't silently drops all events not handled explicitly.
Change-Id: I0b1f57f362f2dc2e82e05d432426cc46d4a100ae
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/animation/frontend/qclipanimator.cpp')
-rw-r--r-- | src/animation/frontend/qclipanimator.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/animation/frontend/qclipanimator.cpp b/src/animation/frontend/qclipanimator.cpp index 6b503e87f..5383e2c9b 100644 --- a/src/animation/frontend/qclipanimator.cpp +++ b/src/animation/frontend/qclipanimator.cpp @@ -42,7 +42,6 @@ #include <Qt3DAnimation/qabstractanimationclip.h> #include <Qt3DAnimation/qchannelmapper.h> #include <Qt3DAnimation/qclock.h> -#include <Qt3DAnimation/private/qanimationcallbacktrigger_p.h> QT_BEGIN_NAMESPACE @@ -167,18 +166,6 @@ Qt3DCore::QNodeCreatedChangeBasePtr QClipAnimator::createNodeCreationChange() co return creationChange; } -/*! \internal */ -void QClipAnimator::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) -{ - if (change->type() == Qt3DCore::CallbackTriggered) { - QAnimationCallbackTriggerPtr callbackTrigger = qSharedPointerCast<Qt3DAnimation::QAnimationCallbackTrigger>(change); - if (callbackTrigger->callback()) - callbackTrigger->callback()->valueChanged(callbackTrigger->value()); - } else if (change->type() == Qt3DCore::PropertyUpdated) { - QAbstractClipAnimator::sceneChangeEvent(change); - } -} - } // namespace Qt3DAnimation QT_END_NAMESPACE |