diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-07 14:02:36 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-07 19:32:07 +0200 |
commit | 8a59b2ebf081af5bb9698281420d0ce59405712d (patch) | |
tree | 354f5ca9f897667c8ee9b0765c32a1f2daabcd92 /src/animation | |
parent | 858e0ce0ef39e3094e09c19fa27a896be4abfe74 (diff) |
Use QList instead of QVector
Task-number: QTBUG-84469
Change-Id: Ic726ce85e01190dbc64426388fd454c54ae3c3e3
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation')
-rw-r--r-- | src/animation/frontend/qabstractanimation.h | 2 | ||||
-rw-r--r-- | src/animation/frontend/qanimationclipdata.cpp | 2 | ||||
-rw-r--r-- | src/animation/frontend/qanimationcontroller.cpp | 4 | ||||
-rw-r--r-- | src/animation/frontend/qanimationcontroller.h | 4 | ||||
-rw-r--r-- | src/animation/frontend/qanimationgroup.cpp | 4 | ||||
-rw-r--r-- | src/animation/frontend/qanimationgroup.h | 4 | ||||
-rw-r--r-- | src/animation/frontend/qchannel.cpp | 2 | ||||
-rw-r--r-- | src/animation/frontend/qchannelcomponent.cpp | 2 | ||||
-rw-r--r-- | src/animation/frontend/qchannelmapper.cpp | 2 | ||||
-rw-r--r-- | src/animation/frontend/qchannelmapper.h | 2 | ||||
-rw-r--r-- | src/animation/frontend/qkeyframeanimation.cpp | 8 | ||||
-rw-r--r-- | src/animation/frontend/qkeyframeanimation.h | 12 | ||||
-rw-r--r-- | src/animation/frontend/qmorphinganimation.cpp | 24 | ||||
-rw-r--r-- | src/animation/frontend/qmorphinganimation.h | 16 | ||||
-rw-r--r-- | src/animation/frontend/qmorphtarget.cpp | 4 | ||||
-rw-r--r-- | src/animation/frontend/qmorphtarget.h | 4 | ||||
-rw-r--r-- | src/animation/frontend/qvertexblendanimation.cpp | 16 | ||||
-rw-r--r-- | src/animation/frontend/qvertexblendanimation.h | 12 |
18 files changed, 62 insertions, 62 deletions
diff --git a/src/animation/frontend/qabstractanimation.h b/src/animation/frontend/qabstractanimation.h index 1d7459217..06e380441 100644 --- a/src/animation/frontend/qabstractanimation.h +++ b/src/animation/frontend/qabstractanimation.h @@ -37,8 +37,8 @@ #ifndef QT3DANIMATION_QABSTRACTANIMATION_H #define QT3DANIMATION_QABSTRACTANIMATION_H +#include <QtCore/qlist.h> #include <QtCore/qobject.h> -#include <QtCore/qvector.h> #include <Qt3DAnimation/qt3danimation_global.h> diff --git a/src/animation/frontend/qanimationclipdata.cpp b/src/animation/frontend/qanimationclipdata.cpp index e105b7b43..1e02332de 100644 --- a/src/animation/frontend/qanimationclipdata.cpp +++ b/src/animation/frontend/qanimationclipdata.cpp @@ -39,7 +39,7 @@ #include "qanimationclipdata.h" -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE diff --git a/src/animation/frontend/qanimationcontroller.cpp b/src/animation/frontend/qanimationcontroller.cpp index ddb105d08..e53188aaa 100644 --- a/src/animation/frontend/qanimationcontroller.cpp +++ b/src/animation/frontend/qanimationcontroller.cpp @@ -229,7 +229,7 @@ QAnimationController::QAnimationController(QObject *parent) /*! Returns the list of animation groups the conroller is currently holding. */ -QVector<QAnimationGroup *> QAnimationController::animationGroupList() +QList<QAnimationGroup *> QAnimationController::animationGroupList() { Q_D(QAnimationController); return d->m_animationGroups; @@ -274,7 +274,7 @@ bool QAnimationController::recursive() const /*! Sets the \a animationGroups for the controller. Old groups are cleared. */ -void QAnimationController::setAnimationGroups(const QVector<Qt3DAnimation::QAnimationGroup *> &animationGroups) +void QAnimationController::setAnimationGroups(const QList<Qt3DAnimation::QAnimationGroup *> &animationGroups) { Q_D(QAnimationController); d->m_animationGroups = animationGroups; diff --git a/src/animation/frontend/qanimationcontroller.h b/src/animation/frontend/qanimationcontroller.h index 47f2e0edd..3cadcab57 100644 --- a/src/animation/frontend/qanimationcontroller.h +++ b/src/animation/frontend/qanimationcontroller.h @@ -62,7 +62,7 @@ class Q_3DANIMATIONSHARED_EXPORT QAnimationController : public QObject public: QAnimationController(QObject *parent = nullptr); - QVector<Qt3DAnimation::QAnimationGroup *> animationGroupList(); + QList<Qt3DAnimation::QAnimationGroup *> animationGroupList(); int activeAnimationGroup() const; float position() const; @@ -71,7 +71,7 @@ public: Qt3DCore::QEntity *entity() const; bool recursive() const; - void setAnimationGroups(const QVector<Qt3DAnimation::QAnimationGroup *> &animationGroups); + void setAnimationGroups(const QList<Qt3DAnimation::QAnimationGroup *> &animationGroups); void addAnimationGroup(Qt3DAnimation::QAnimationGroup *animationGroups); void removeAnimationGroup(Qt3DAnimation::QAnimationGroup *animationGroups); diff --git a/src/animation/frontend/qanimationgroup.cpp b/src/animation/frontend/qanimationgroup.cpp index 84078b4f4..b766b2770 100644 --- a/src/animation/frontend/qanimationgroup.cpp +++ b/src/animation/frontend/qanimationgroup.cpp @@ -131,7 +131,7 @@ QString QAnimationGroup::name() const /*! Returns the list of animations in the group. */ -QVector<Qt3DAnimation::QAbstractAnimation *> QAnimationGroup::animationList() +QList<Qt3DAnimation::QAbstractAnimation *> QAnimationGroup::animationList() { Q_D(QAnimationGroup); return d->m_animations; @@ -161,7 +161,7 @@ void QAnimationGroup::setName(const QString &name) /*! Sets the \a animations to the group. Old animations are removed. */ -void QAnimationGroup::setAnimations(const QVector<Qt3DAnimation::QAbstractAnimation *> &animations) +void QAnimationGroup::setAnimations(const QList<Qt3DAnimation::QAbstractAnimation *> &animations) { Q_D(QAnimationGroup); d->m_animations = animations; diff --git a/src/animation/frontend/qanimationgroup.h b/src/animation/frontend/qanimationgroup.h index dd18edafc..1a3086b39 100644 --- a/src/animation/frontend/qanimationgroup.h +++ b/src/animation/frontend/qanimationgroup.h @@ -60,11 +60,11 @@ public: explicit QAnimationGroup(QObject *parent = nullptr); QString name() const; - QVector<Qt3DAnimation::QAbstractAnimation *> animationList(); + QList<Qt3DAnimation::QAbstractAnimation *> animationList(); float position() const; float duration() const; - void setAnimations(const QVector<Qt3DAnimation::QAbstractAnimation *> &animations); + void setAnimations(const QList<Qt3DAnimation::QAbstractAnimation *> &animations); void addAnimation(Qt3DAnimation::QAbstractAnimation *animation); void removeAnimation(Qt3DAnimation::QAbstractAnimation *animation); diff --git a/src/animation/frontend/qchannel.cpp b/src/animation/frontend/qchannel.cpp index 1e0da3c3f..9e47357e2 100644 --- a/src/animation/frontend/qchannel.cpp +++ b/src/animation/frontend/qchannel.cpp @@ -39,7 +39,7 @@ #include "qchannel.h" -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE diff --git a/src/animation/frontend/qchannelcomponent.cpp b/src/animation/frontend/qchannelcomponent.cpp index b8511dd1f..60c0fec88 100644 --- a/src/animation/frontend/qchannelcomponent.cpp +++ b/src/animation/frontend/qchannelcomponent.cpp @@ -39,7 +39,7 @@ #include "qchannelcomponent.h" -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE diff --git a/src/animation/frontend/qchannelmapper.cpp b/src/animation/frontend/qchannelmapper.cpp index 711259e7f..cbbf05549 100644 --- a/src/animation/frontend/qchannelmapper.cpp +++ b/src/animation/frontend/qchannelmapper.cpp @@ -100,7 +100,7 @@ void QChannelMapper::removeMapping(QAbstractChannelMapping *mapping) d->unregisterDestructionHelper(mapping); } -QVector<QAbstractChannelMapping *> QChannelMapper::mappings() const +QList<QAbstractChannelMapping *> QChannelMapper::mappings() const { Q_D(const QChannelMapper); return d->m_mappings; diff --git a/src/animation/frontend/qchannelmapper.h b/src/animation/frontend/qchannelmapper.h index 109bf7e06..675b800df 100644 --- a/src/animation/frontend/qchannelmapper.h +++ b/src/animation/frontend/qchannelmapper.h @@ -57,7 +57,7 @@ public: void addMapping(QAbstractChannelMapping *mapping); void removeMapping(QAbstractChannelMapping *mapping); - QVector<QAbstractChannelMapping *> mappings() const; + QList<QAbstractChannelMapping *> mappings() const; protected: explicit QChannelMapper(QChannelMapperPrivate &dd, Qt3DCore::QNode *parent = nullptr); diff --git a/src/animation/frontend/qkeyframeanimation.cpp b/src/animation/frontend/qkeyframeanimation.cpp index 53d48a12b..5bd55220a 100644 --- a/src/animation/frontend/qkeyframeanimation.cpp +++ b/src/animation/frontend/qkeyframeanimation.cpp @@ -178,7 +178,7 @@ QKeyframeAnimation::QKeyframeAnimation(QObject *parent) } -void QKeyframeAnimation::setFramePositions(const QVector<float> &positions) +void QKeyframeAnimation::setFramePositions(const QList<float> &positions) { Q_D(QKeyframeAnimation); d->m_framePositions = positions; @@ -201,7 +201,7 @@ void QKeyframeAnimation::setFramePositions(const QVector<float> &positions) /*! Sets the \a keyframes of the animation. Old keyframes are cleared. */ -void QKeyframeAnimation::setKeyframes(const QVector<Qt3DCore::QTransform *> &keyframes) +void QKeyframeAnimation::setKeyframes(const QList<Qt3DCore::QTransform *> &keyframes) { Q_D(QKeyframeAnimation); d->m_keyframes = keyframes; @@ -293,7 +293,7 @@ void QKeyframeAnimation::updateAnimation(float position) d->calculateFrame(position); } -QVector<float> QKeyframeAnimation::framePositions() const +QList<float> QKeyframeAnimation::framePositions() const { Q_D(const QKeyframeAnimation); return d->m_framePositions; @@ -302,7 +302,7 @@ QVector<float> QKeyframeAnimation::framePositions() const /*! Returns the list of keyframes. */ -QVector<Qt3DCore::QTransform *> QKeyframeAnimation::keyframeList() const +QList<Qt3DCore::QTransform *> QKeyframeAnimation::keyframeList() const { Q_D(const QKeyframeAnimation); return d->m_keyframes; diff --git a/src/animation/frontend/qkeyframeanimation.h b/src/animation/frontend/qkeyframeanimation.h index 0aed76cfb..58ca19092 100644 --- a/src/animation/frontend/qkeyframeanimation.h +++ b/src/animation/frontend/qkeyframeanimation.h @@ -53,7 +53,7 @@ class QKeyframeAnimationPrivate; class Q_3DANIMATIONSHARED_EXPORT QKeyframeAnimation : public QAbstractAnimation { Q_OBJECT - Q_PROPERTY(QVector<float> framePositions READ framePositions WRITE setFramePositions NOTIFY framePositionsChanged) + Q_PROPERTY(QList<float> framePositions READ framePositions WRITE setFramePositions NOTIFY framePositionsChanged) Q_PROPERTY(Qt3DCore::QTransform *target READ target WRITE setTarget NOTIFY targetChanged) Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) Q_PROPERTY(QString targetName READ targetName WRITE setTargetName NOTIFY targetNameChanged) @@ -71,20 +71,20 @@ public: }; Q_ENUM(RepeatMode) - QVector<float> framePositions() const; - QVector<Qt3DCore::QTransform *> keyframeList() const; + QList<float> framePositions() const; + QList<Qt3DCore::QTransform *> keyframeList() const; Qt3DCore::QTransform *target() const; QEasingCurve easing() const; QString targetName() const; RepeatMode startMode() const; RepeatMode endMode() const; - void setKeyframes(const QVector<Qt3DCore::QTransform *> &keyframes); + void setKeyframes(const QList<Qt3DCore::QTransform *> &keyframes); void addKeyframe(Qt3DCore::QTransform *keyframe); void removeKeyframe(Qt3DCore::QTransform *keyframe); public Q_SLOTS: - void setFramePositions(const QVector<float> &positions); + void setFramePositions(const QList<float> &positions); void setTarget(Qt3DCore::QTransform *target); void setEasing(const QEasingCurve &easing); void setTargetName(const QString &name); @@ -92,7 +92,7 @@ public Q_SLOTS: void setEndMode(RepeatMode mode); Q_SIGNALS: - void framePositionsChanged(const QVector<float> &positions); + void framePositionsChanged(const QList<float> &positions); void targetChanged(Qt3DCore::QTransform *target); void easingChanged(const QEasingCurve &easing); void targetNameChanged(const QString &name); diff --git a/src/animation/frontend/qmorphinganimation.cpp b/src/animation/frontend/qmorphinganimation.cpp index 5b16668f9..63c0d68ca 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 : qAsConst(m_weights)) + for (QList<float> *weights : qAsConst(m_weights)) delete weights; } @@ -189,7 +189,7 @@ void QMorphingAnimationPrivate::updateAnimation(float position) if (!m_target || !m_target->geometry()) return; - QVector<int> relevantValues; + QList<int> relevantValues; float sum = 0.0f; float interpolator = 0.0f; m_morphKey.resize(m_morphTargets.size()); @@ -252,12 +252,12 @@ void QMorphingAnimationPrivate::setTargetInterpolated(int morphTarget) // remove attributes from previous frame if (m_currentTarget && (target != m_currentTarget)) { - const QVector<Qt3DCore::QAttribute *> targetAttributes = m_currentTarget->attributeList(); + const QList<Qt3DCore::QAttribute *> targetAttributes = m_currentTarget->attributeList(); for (int i = 0; i < targetAttributes.size(); ++i) geometry->removeAttribute(targetAttributes.at(i)); } - const QVector<Qt3DCore::QAttribute *> targetAttributes = target->attributeList(); + const QList<Qt3DCore::QAttribute *> targetAttributes = target->attributeList(); // add attributes from current frame to the geometry if (target != m_currentTarget) { @@ -282,7 +282,7 @@ QMorphingAnimation::QMorphingAnimation(QObject *parent) this, &QMorphingAnimation::updateAnimation); } -QVector<float> QMorphingAnimation::targetPositions() const +QList<float> QMorphingAnimation::targetPositions() const { Q_D(const QMorphingAnimation); return d->m_targetPositions; @@ -321,7 +321,7 @@ QEasingCurve QMorphingAnimation::easing() const /*! Set morph \a targets to animation. Old targets are cleared. */ -void QMorphingAnimation::setMorphTargets(const QVector<Qt3DAnimation::QMorphTarget *> &targets) +void QMorphingAnimation::setMorphTargets(const QList<Qt3DAnimation::QMorphTarget *> &targets) { Q_D(QMorphingAnimation); d->m_morphTargets = targets; @@ -353,7 +353,7 @@ void QMorphingAnimation::removeMorphTarget(Qt3DAnimation::QMorphTarget *target) d->m_position = -1.0f; } -void QMorphingAnimation::setTargetPositions(const QVector<float> &targetPositions) +void QMorphingAnimation::setTargetPositions(const QList<float> &targetPositions) { Q_D(QMorphingAnimation); d->m_targetPositions = targetPositions; @@ -365,7 +365,7 @@ void QMorphingAnimation::setTargetPositions(const QVector<float> &targetPosition d->m_weights.resize(targetPositions.size()); for (int i = 0; i < d->m_weights.size(); ++i) { if (d->m_weights[i] == nullptr) - d->m_weights[i] = new QVector<float>(); + d->m_weights[i] = new QList<float>(); } } d->m_position = -1.0f; @@ -384,13 +384,13 @@ void QMorphingAnimation::setTarget(Qt3DRender::QGeometryRenderer *target) /*! Sets morph \a weights at \a positionIndex. */ -void QMorphingAnimation::setWeights(int positionIndex, const QVector<float> &weights) +void QMorphingAnimation::setWeights(int positionIndex, const QList<float> &weights) { Q_D(QMorphingAnimation); if (d->m_weights.size() < positionIndex) d->m_weights.resize(positionIndex + 1); if (d->m_weights[positionIndex] == nullptr) - d->m_weights[positionIndex] = new QVector<float>(); + d->m_weights[positionIndex] = new QList<float>(); *d->m_weights[positionIndex] = weights; d->m_position = -1.0f; } @@ -398,7 +398,7 @@ void QMorphingAnimation::setWeights(int positionIndex, const QVector<float> &wei /*! Return morph weights at \a positionIndex. */ -QVector<float> QMorphingAnimation::getWeights(int positionIndex) +QList<float> QMorphingAnimation::getWeights(int positionIndex) { Q_D(QMorphingAnimation); return *d->m_weights[positionIndex]; @@ -407,7 +407,7 @@ QVector<float> QMorphingAnimation::getWeights(int positionIndex) /*! Return morph target list. */ -QVector<Qt3DAnimation::QMorphTarget *> QMorphingAnimation::morphTargetList() +QList<Qt3DAnimation::QMorphTarget *> QMorphingAnimation::morphTargetList() { Q_D(QMorphingAnimation); return d->m_morphTargets; diff --git a/src/animation/frontend/qmorphinganimation.h b/src/animation/frontend/qmorphinganimation.h index 1a9a60695..fab6f5b44 100644 --- a/src/animation/frontend/qmorphinganimation.h +++ b/src/animation/frontend/qmorphinganimation.h @@ -54,7 +54,7 @@ class QMorphingAnimationPrivate; class Q_3DANIMATIONSHARED_EXPORT QMorphingAnimation : public QAbstractAnimation { Q_OBJECT - Q_PROPERTY(QVector<float> targetPositions READ targetPositions WRITE setTargetPositions NOTIFY targetPositionsChanged) + Q_PROPERTY(QList<float> targetPositions READ targetPositions WRITE setTargetPositions NOTIFY targetPositionsChanged) Q_PROPERTY(float interpolator READ interpolator NOTIFY interpolatorChanged) Q_PROPERTY(Qt3DRender::QGeometryRenderer *target READ target WRITE setTarget NOTIFY targetChanged) Q_PROPERTY(QString targetName READ targetName WRITE setTargetName NOTIFY targetNameChanged) @@ -71,31 +71,31 @@ public: explicit QMorphingAnimation(QObject *parent = nullptr); - QVector<float> targetPositions() const; + QList<float> targetPositions() const; float interpolator() const; Qt3DRender::QGeometryRenderer *target() const; QString targetName() const; QMorphingAnimation::Method method() const; QEasingCurve easing() const; - void setMorphTargets(const QVector<Qt3DAnimation::QMorphTarget *> &targets); + void setMorphTargets(const QList<Qt3DAnimation::QMorphTarget *> &targets); void addMorphTarget(Qt3DAnimation::QMorphTarget *target); void removeMorphTarget(Qt3DAnimation::QMorphTarget *target); - void setWeights(int positionIndex, const QVector<float> &weights); - QVector<float> getWeights(int positionIndex); + void setWeights(int positionIndex, const QList<float> &weights); + QList<float> getWeights(int positionIndex); - QVector<Qt3DAnimation::QMorphTarget *> morphTargetList(); + QList<Qt3DAnimation::QMorphTarget *> morphTargetList(); public Q_SLOTS: - void setTargetPositions(const QVector<float> &targetPositions); + void setTargetPositions(const QList<float> &targetPositions); void setTarget(Qt3DRender::QGeometryRenderer *target); void setTargetName(const QString name); void setMethod(QMorphingAnimation::Method method); void setEasing(const QEasingCurve &easing); Q_SIGNALS: - void targetPositionsChanged(const QVector<float> &targetPositions); + void targetPositionsChanged(const QList<float> &targetPositions); void interpolatorChanged(float interpolator); void targetChanged(Qt3DRender::QGeometryRenderer *target); void targetNameChanged(const QString &name); diff --git a/src/animation/frontend/qmorphtarget.cpp b/src/animation/frontend/qmorphtarget.cpp index 1edaf2445..bca51cfe4 100644 --- a/src/animation/frontend/qmorphtarget.cpp +++ b/src/animation/frontend/qmorphtarget.cpp @@ -115,7 +115,7 @@ QMorphTarget::QMorphTarget(QObject *parent) /*! Returns a list of attributes contained in the morph target. */ -QVector<Qt3DCore::QAttribute *> QMorphTarget::attributeList() const +QList<Qt3DCore::QAttribute *> QMorphTarget::attributeList() const { Q_D(const QMorphTarget); return d->m_targetAttributes; @@ -130,7 +130,7 @@ QStringList QMorphTarget::attributeNames() const /*! Sets \a attributes to the morph target. Old attributes are cleared. */ -void QMorphTarget::setAttributes(const QVector<Qt3DCore::QAttribute *> &attributes) +void QMorphTarget::setAttributes(const QList<Qt3DCore::QAttribute *> &attributes) { Q_D(QMorphTarget); d->m_targetAttributes = attributes; diff --git a/src/animation/frontend/qmorphtarget.h b/src/animation/frontend/qmorphtarget.h index 210a3be41..039158398 100644 --- a/src/animation/frontend/qmorphtarget.h +++ b/src/animation/frontend/qmorphtarget.h @@ -58,10 +58,10 @@ class Q_3DANIMATIONSHARED_EXPORT QMorphTarget : public QObject public: explicit QMorphTarget(QObject *parent = nullptr); - QVector<Qt3DCore::QAttribute *> attributeList() const; + QList<Qt3DCore::QAttribute *> attributeList() const; QStringList attributeNames() const; - void setAttributes(const QVector<Qt3DCore::QAttribute *> &attributes); + void setAttributes(const QList<Qt3DCore::QAttribute *> &attributes); void addAttribute(Qt3DCore::QAttribute *attribute); void removeAttribute(Qt3DCore::QAttribute *attribute); diff --git a/src/animation/frontend/qvertexblendanimation.cpp b/src/animation/frontend/qvertexblendanimation.cpp index 77ba9a301..b997dbabc 100644 --- a/src/animation/frontend/qvertexblendanimation.cpp +++ b/src/animation/frontend/qvertexblendanimation.cpp @@ -194,16 +194,16 @@ void QVertexBlendAnimationPrivate::updateAnimation(float position) // remove attributes from previous frame if (m_currentBase && m_currentTarget && (base != m_currentBase || target != m_currentTarget)) { - const QVector<Qt3DCore::QAttribute *> baseAttributes = m_currentBase->attributeList(); - const QVector<Qt3DCore::QAttribute *> targetAttributes = m_currentTarget->attributeList(); + const QList<Qt3DCore::QAttribute *> baseAttributes = m_currentBase->attributeList(); + const QList<Qt3DCore::QAttribute *> targetAttributes = m_currentTarget->attributeList(); for (int i = 0; i < baseAttributes.size(); ++i) { geometry->removeAttribute(baseAttributes.at(i)); geometry->removeAttribute(targetAttributes.at(i)); } } - const QVector<Qt3DCore::QAttribute *> baseAttributes = base->attributeList(); - const QVector<Qt3DCore::QAttribute *> targetAttributes = target->attributeList(); + const QList<Qt3DCore::QAttribute *> baseAttributes = base->attributeList(); + const QList<Qt3DCore::QAttribute *> targetAttributes = target->attributeList(); const QStringList attributeNames = base->attributeNames(); // add attributes from current frame to the geometry @@ -239,7 +239,7 @@ QVertexBlendAnimation::QVertexBlendAnimation(QObject *parent) this, &QVertexBlendAnimation::updateAnimation); } -QVector<float> QVertexBlendAnimation::targetPositions() const +QList<float> QVertexBlendAnimation::targetPositions() const { Q_D(const QVertexBlendAnimation); return d->m_targetPositions; @@ -266,7 +266,7 @@ QString QVertexBlendAnimation::targetName() const /*! Set morph \a targets to animation. Old targets are cleared. */ -void QVertexBlendAnimation::setMorphTargets(const QVector<Qt3DAnimation::QMorphTarget *> &targets) +void QVertexBlendAnimation::setMorphTargets(const QList<Qt3DAnimation::QMorphTarget *> &targets) { Q_D(QVertexBlendAnimation); d->m_morphTargets = targets; @@ -291,7 +291,7 @@ void QVertexBlendAnimation::removeMorphTarget(Qt3DAnimation::QMorphTarget *targe d->m_morphTargets.removeAll(target); } -void QVertexBlendAnimation::setTargetPositions(const QVector<float> &targetPositions) +void QVertexBlendAnimation::setTargetPositions(const QList<float> &targetPositions) { Q_D(QVertexBlendAnimation); if (d->m_targetPositions == targetPositions) @@ -313,7 +313,7 @@ void QVertexBlendAnimation::setTarget(Qt3DRender::QGeometryRenderer *target) /*! Return morph target list. */ -QVector<Qt3DAnimation::QMorphTarget *> QVertexBlendAnimation::morphTargetList() +QList<Qt3DAnimation::QMorphTarget *> QVertexBlendAnimation::morphTargetList() { Q_D(QVertexBlendAnimation); return d->m_morphTargets; diff --git a/src/animation/frontend/qvertexblendanimation.h b/src/animation/frontend/qvertexblendanimation.h index 1be721ce4..89247656f 100644 --- a/src/animation/frontend/qvertexblendanimation.h +++ b/src/animation/frontend/qvertexblendanimation.h @@ -52,7 +52,7 @@ class QVertexBlendAnimationPrivate; class Q_3DANIMATIONSHARED_EXPORT QVertexBlendAnimation : public QAbstractAnimation { Q_OBJECT - Q_PROPERTY(QVector<float> targetPositions READ targetPositions WRITE setTargetPositions NOTIFY targetPositionsChanged) + Q_PROPERTY(QList<float> targetPositions READ targetPositions WRITE setTargetPositions NOTIFY targetPositionsChanged) Q_PROPERTY(float interpolator READ interpolator NOTIFY interpolatorChanged) Q_PROPERTY(Qt3DRender::QGeometryRenderer *target READ target WRITE setTarget NOTIFY targetChanged) Q_PROPERTY(QString targetName READ targetName WRITE setTargetName NOTIFY targetNameChanged) @@ -60,24 +60,24 @@ class Q_3DANIMATIONSHARED_EXPORT QVertexBlendAnimation : public QAbstractAnimati public: explicit QVertexBlendAnimation(QObject *parent = nullptr); - QVector<float> targetPositions() const; + QList<float> targetPositions() const; float interpolator() const; Qt3DRender::QGeometryRenderer *target() const; QString targetName() const; - void setMorphTargets(const QVector<Qt3DAnimation::QMorphTarget *> &targets); + void setMorphTargets(const QList<Qt3DAnimation::QMorphTarget *> &targets); void addMorphTarget(Qt3DAnimation::QMorphTarget *target); void removeMorphTarget(Qt3DAnimation::QMorphTarget *target); - QVector<Qt3DAnimation::QMorphTarget *> morphTargetList(); + QList<Qt3DAnimation::QMorphTarget *> morphTargetList(); public Q_SLOTS: - void setTargetPositions(const QVector<float> &targetPositions); + void setTargetPositions(const QList<float> &targetPositions); void setTarget(Qt3DRender::QGeometryRenderer *target); void setTargetName(const QString name); Q_SIGNALS: - void targetPositionsChanged(const QVector<float> &targetPositions); + void targetPositionsChanged(const QList<float> &targetPositions); void interpolatorChanged(float interpolator); void targetChanged(Qt3DRender::QGeometryRenderer *target); void targetNameChanged(const QString &name); |