diff options
Diffstat (limited to 'src/animation')
-rw-r--r-- | src/animation/backend/animationclip_p.h | 2 | ||||
-rw-r--r-- | src/animation/backend/animationutils.cpp | 2 | ||||
-rw-r--r-- | src/animation/backend/buildblendtreesjob.cpp | 2 | ||||
-rw-r--r-- | src/animation/backend/fcurve_p.h | 2 | ||||
-rw-r--r-- | src/animation/frontend/qanimationcontroller.cpp | 4 | ||||
-rw-r--r-- | src/animation/frontend/qanimationgroup.cpp | 2 | ||||
-rw-r--r-- | src/animation/frontend/qkeyframeanimation.cpp | 2 | ||||
-rw-r--r-- | src/animation/frontend/qmorphinganimation.cpp | 2 | ||||
-rw-r--r-- | src/animation/frontend/qmorphtarget.cpp | 4 | ||||
-rw-r--r-- | src/animation/frontend/qvertexblendanimation.cpp | 6 |
10 files changed, 16 insertions, 12 deletions
diff --git a/src/animation/backend/animationclip_p.h b/src/animation/backend/animationclip_p.h index 286ec38c0..7ff79c01a 100644 --- a/src/animation/backend/animationclip_p.h +++ b/src/animation/backend/animationclip_p.h @@ -127,7 +127,7 @@ inline QDebug operator<<(QDebug dbg, const AnimationClip &animationClip) << "Channels:" << endl; const QVector<Channel> channels = animationClip.channels(); - for (const auto channel : channels) { + for (const auto &channel : channels) { dbg << channel; } diff --git a/src/animation/backend/animationutils.cpp b/src/animation/backend/animationutils.cpp index c9c7c29d4..1f675f271 100644 --- a/src/animation/backend/animationutils.cpp +++ b/src/animation/backend/animationutils.cpp @@ -197,7 +197,7 @@ ClipResults evaluateClipAtLocalTime(AnimationClip *clip, float localTime) const QVector<Channel> &channels = clip->channels(); int i = 0; for (const Channel &channel : channels) { - for (const auto channelComponent : qAsConst(channel.channelComponents)) + for (const auto &channelComponent : qAsConst(channel.channelComponents)) channelResults[i++] = channelComponent.fcurve.evaluateAtTime(localTime); } return channelResults; diff --git a/src/animation/backend/buildblendtreesjob.cpp b/src/animation/backend/buildblendtreesjob.cpp index ac95808bc..fe56099a2 100644 --- a/src/animation/backend/buildblendtreesjob.cpp +++ b/src/animation/backend/buildblendtreesjob.cpp @@ -63,7 +63,7 @@ void BuildBlendTreesJob::setBlendedClipAnimators(const QVector<HBlendedClipAnima // We assume that the structure of blend node tree does not change once a BlendClipAnimator has been set to running void BuildBlendTreesJob::run() { - for (const HBlendedClipAnimator blendedClipAnimatorHandle : m_blendedClipAnimatorHandles) { + for (const HBlendedClipAnimator blendedClipAnimatorHandle : qAsConst(m_blendedClipAnimatorHandles)) { // Retrieve BlendTree node BlendedClipAnimator *blendClipAnimator = m_handler->blendedClipAnimatorManager()->data(blendedClipAnimatorHandle); Q_ASSERT(blendClipAnimator); diff --git a/src/animation/backend/fcurve_p.h b/src/animation/backend/fcurve_p.h index 7bc6ccccb..7ab1593d1 100644 --- a/src/animation/backend/fcurve_p.h +++ b/src/animation/backend/fcurve_p.h @@ -146,7 +146,7 @@ inline QDebug operator<<(QDebug dbg, const Channel &channel) dbg << "Channel Name: " << channel.name << endl << "Channels:" << channel.channelComponents.size() << endl; - for (const auto channelComponent : qAsConst(channel.channelComponents)) { + for (const auto &channelComponent : qAsConst(channel.channelComponents)) { dbg << channelComponent; } return dbg; diff --git a/src/animation/frontend/qanimationcontroller.cpp b/src/animation/frontend/qanimationcontroller.cpp index 5df2c713a..d4c3c4005 100644 --- a/src/animation/frontend/qanimationcontroller.cpp +++ b/src/animation/frontend/qanimationcontroller.cpp @@ -182,7 +182,7 @@ float QAnimationControllerPrivate::scaledPosition(float position) const QAnimationGroup *QAnimationControllerPrivate::findGroup(const QString &name) { - for (QAnimationGroup *g : m_animationGroups) { + for (QAnimationGroup *g : qAsConst(m_animationGroups)) { if (g->name() == name) return g; } @@ -211,7 +211,7 @@ void QAnimationControllerPrivate::extractAnimations() } void QAnimationControllerPrivate::clearAnimations() { - for (Qt3DAnimation::QAnimationGroup *a : m_animationGroups) + for (Qt3DAnimation::QAnimationGroup *a : qAsConst(m_animationGroups)) a->deleteLater(); m_animationGroups.clear(); m_activeAnimationGroup = 0; diff --git a/src/animation/frontend/qanimationgroup.cpp b/src/animation/frontend/qanimationgroup.cpp index 07d0fadc5..365745662 100644 --- a/src/animation/frontend/qanimationgroup.cpp +++ b/src/animation/frontend/qanimationgroup.cpp @@ -109,7 +109,7 @@ QAnimationGroupPrivate::QAnimationGroupPrivate() void QAnimationGroupPrivate::updatePosition(float position) { m_position = position; - for (QAbstractAnimation *aa : m_animations) + for (QAbstractAnimation *aa : qAsConst(m_animations)) aa->setPosition(position); } diff --git a/src/animation/frontend/qkeyframeanimation.cpp b/src/animation/frontend/qkeyframeanimation.cpp index 19069a8ed..597b34cee 100644 --- a/src/animation/frontend/qkeyframeanimation.cpp +++ b/src/animation/frontend/qkeyframeanimation.cpp @@ -190,7 +190,7 @@ void QKeyframeAnimation::setFramePositions(const QVector<float> &positions) d->m_minposition = d->m_framePositions.first(); d->m_maxposition = d->m_framePositions.last(); float lastPos = d->m_minposition; - for (float p : d->m_framePositions) { + for (float p : qAsConst(d->m_framePositions)) { if (p < lastPos || p > d->m_maxposition) qWarning() << "positions not ordered correctly"; lastPos = p; diff --git a/src/animation/frontend/qmorphinganimation.cpp b/src/animation/frontend/qmorphinganimation.cpp index e8f440c45..3824b8d64 100644 --- a/src/animation/frontend/qmorphinganimation.cpp +++ b/src/animation/frontend/qmorphinganimation.cpp @@ -179,7 +179,7 @@ QMorphingAnimationPrivate::QMorphingAnimationPrivate() QMorphingAnimationPrivate::~QMorphingAnimationPrivate() { - for (QVector<float> *weights : m_weights) + for (QVector<float> *weights : qAsConst(m_weights)) delete weights; } diff --git a/src/animation/frontend/qmorphtarget.cpp b/src/animation/frontend/qmorphtarget.cpp index e16dd8698..9dc30b8ba 100644 --- a/src/animation/frontend/qmorphtarget.cpp +++ b/src/animation/frontend/qmorphtarget.cpp @@ -99,7 +99,7 @@ QMorphTargetPrivate::QMorphTargetPrivate() void QMorphTargetPrivate::updateAttributeNames() { m_attributeNames.clear(); - for (const Qt3DRender::QAttribute *attr : m_targetAttributes) + for (const Qt3DRender::QAttribute *attr : qAsConst(m_targetAttributes)) m_attributeNames.push_back(attr->name()); } @@ -148,7 +148,7 @@ void QMorphTarget::setAttributes(const QVector<Qt3DRender::QAttribute *> &attrib void QMorphTarget::addAttribute(Qt3DRender::QAttribute *attribute) { Q_D(QMorphTarget); - for (const Qt3DRender::QAttribute *attr : d->m_targetAttributes) { + for (const Qt3DRender::QAttribute *attr : qAsConst(d->m_targetAttributes)) { if (attr->name() == attribute->name()) return; } diff --git a/src/animation/frontend/qvertexblendanimation.cpp b/src/animation/frontend/qvertexblendanimation.cpp index efc36e45c..3ddd83bf0 100644 --- a/src/animation/frontend/qvertexblendanimation.cpp +++ b/src/animation/frontend/qvertexblendanimation.cpp @@ -125,7 +125,7 @@ namespace Qt3DAnimation { \readonly */ /*! - \qmlproperty VertexBlendAnimation::target + \qmlproperty GeometryRenderer VertexBlendAnimation::target Holds the target GeometryRenderer the morphing animation is applied to. */ /*! @@ -135,6 +135,10 @@ namespace Qt3DAnimation { is usually same as the name of the parent entity of the target GeometryRenderer, but does not have to be. */ +/*! + \qmlproperty list<MorphTarget> VertexBlendAnimation::morphTargets + Holds the list of \l {MorphTarget}{morph targets} added to the animation. +*/ QVertexBlendAnimationPrivate::QVertexBlendAnimationPrivate() : QAbstractAnimationPrivate(QAbstractAnimation::VertexBlendAnimation) |