diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-08 15:56:06 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-09 12:23:57 +0200 |
commit | 39d0041f15601cee499c959702b004cbd721bed9 (patch) | |
tree | 95140b88dee61bd78d171cb958ceca0cca978ad1 | |
parent | 93bd28e6d4ac8fdb6b07b30684e6b17ee515e44e (diff) |
Use QList instead of QVector in implementation and docs
Fix some const correctness.
Use list-initialization.
Task-number: QTBUG-84469
Change-Id: I9c56742581f48f89a3b02e4121fae414117c7a25
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
172 files changed, 531 insertions, 554 deletions
diff --git a/src/animation/backend/abstractevaluateclipanimatorjob.cpp b/src/animation/backend/abstractevaluateclipanimatorjob.cpp index 5267d4526..43c1de260 100644 --- a/src/animation/backend/abstractevaluateclipanimatorjob.cpp +++ b/src/animation/backend/abstractevaluateclipanimatorjob.cpp @@ -54,7 +54,7 @@ public: void postFrame(Qt3DCore::QAspectManager *manager) override; AnimationRecord m_record; - QVector<AnimationCallbackAndValue> m_callbacks; + QList<AnimationCallbackAndValue> m_callbacks; }; AbstractEvaluateClipAnimatorJob::AbstractEvaluateClipAnimatorJob() @@ -62,7 +62,7 @@ AbstractEvaluateClipAnimatorJob::AbstractEvaluateClipAnimatorJob() { } -void AbstractEvaluateClipAnimatorJob::setPostFrameData(const AnimationRecord &record, const QVector<AnimationCallbackAndValue> &callbacks) +void AbstractEvaluateClipAnimatorJob::setPostFrameData(const AnimationRecord &record, const QList<AnimationCallbackAndValue> &callbacks) { auto mainThreadCB = callbacks; mainThreadCB.erase(std::remove_if(mainThreadCB.begin(), mainThreadCB.end(), [](const AnimationCallbackAndValue &callback) { diff --git a/src/animation/backend/abstractevaluateclipanimatorjob_p.h b/src/animation/backend/abstractevaluateclipanimatorjob_p.h index 2a8914faa..5bf88978a 100644 --- a/src/animation/backend/abstractevaluateclipanimatorjob_p.h +++ b/src/animation/backend/abstractevaluateclipanimatorjob_p.h @@ -63,7 +63,7 @@ class AbstractEvaluateClipAnimatorJob : public Qt3DCore::QAspectJob protected: AbstractEvaluateClipAnimatorJob(); - void setPostFrameData(const AnimationRecord &record, const QVector<AnimationCallbackAndValue> &callbacks); + void setPostFrameData(const AnimationRecord &record, const QList<AnimationCallbackAndValue> &callbacks); private: Q_DECLARE_PRIVATE(AbstractEvaluateClipAnimatorJob) diff --git a/src/animation/backend/additiveclipblend.cpp b/src/animation/backend/additiveclipblend.cpp index b89a1bbb2..338f64d36 100644 --- a/src/animation/backend/additiveclipblend.cpp +++ b/src/animation/backend/additiveclipblend.cpp @@ -68,7 +68,7 @@ void AdditiveClipBlend::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool f m_additiveClipId = Qt3DCore::qIdForNode(node->additiveClip()); } -ClipResults AdditiveClipBlend::doBlend(const QVector<ClipResults> &blendData) const +ClipResults AdditiveClipBlend::doBlend(const QList<ClipResults> &blendData) const { Q_ASSERT(blendData.size() == 2); Q_ASSERT(blendData[0].size() == blendData[1].size()); diff --git a/src/animation/backend/additiveclipblend_p.h b/src/animation/backend/additiveclipblend_p.h index 48e882303..3a89707c7 100644 --- a/src/animation/backend/additiveclipblend_p.h +++ b/src/animation/backend/additiveclipblend_p.h @@ -73,12 +73,12 @@ public: void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) final; - inline QVector<Qt3DCore::QNodeId> allDependencyIds() const override + inline QList<Qt3DCore::QNodeId> allDependencyIds() const override { return currentDependencyIds(); } - inline QVector<Qt3DCore::QNodeId> currentDependencyIds() const override + inline QList<Qt3DCore::QNodeId> currentDependencyIds() const override { return { m_baseClipId, m_additiveClipId }; } @@ -91,7 +91,7 @@ public: } protected: - ClipResults doBlend(const QVector<ClipResults> &blendData) const final; + ClipResults doBlend(const QList<ClipResults> &blendData) const final; private: Qt3DCore::QNodeId m_baseClipId; diff --git a/src/animation/backend/animationclip_p.h b/src/animation/backend/animationclip_p.h index ce97ef2c7..38bc117fe 100644 --- a/src/animation/backend/animationclip_p.h +++ b/src/animation/backend/animationclip_p.h @@ -78,7 +78,7 @@ public: void addDependingBlendedClipAnimator(const Qt3DCore::QNodeId &id); QString name() const { return m_name; } - const QVector<Channel> &channels() const { return m_channels; } + const QList<Channel> &channels() const { return m_channels; } // Called from jobs void loadAnimation(); @@ -117,7 +117,7 @@ private: ClipDataType m_dataType; QString m_name; - QVector<Channel> m_channels; + QList<Channel> m_channels; float m_duration; int m_channelComponentCount; @@ -134,7 +134,7 @@ inline QDebug operator<<(QDebug dbg, const AnimationClip &animationClip) << "Duration: " << animationClip.duration() << Qt::endl << "Channels:" << Qt::endl; - const QVector<Channel> channels = animationClip.channels(); + const QList<Channel> channels = animationClip.channels(); for (const auto &channel : channels) { dbg << channel; } diff --git a/src/animation/backend/animationutils.cpp b/src/animation/backend/animationutils.cpp index a5656e230..2c0c5cb6d 100644 --- a/src/animation/backend/animationutils.cpp +++ b/src/animation/backend/animationutils.cpp @@ -60,12 +60,12 @@ const auto slerpThreshold = 0.01f; namespace Qt3DAnimation { namespace Animation { -inline QVector<float> valueToVector(const QVector3D &value) +inline QList<float> valueToVector(const QVector3D &value) { return { value.x(), value.y(), value.z() }; } -inline QVector<float> valueToVector(const QQuaternion &value) +inline QList<float> valueToVector(const QQuaternion &value) { return { value.scalar(), value.x(), value.y(), value.z() }; } @@ -157,17 +157,10 @@ ComponentIndices channelComponentsToIndices(const Channel &channel, int expectedComponentCount, int offset) { -#if defined Q_COMPILER_UNIFORM_INIT - static const QVector<char> standardSuffixes = { 'X', 'Y', 'Z', 'W' }; - static const QVector<char> quaternionSuffixes = { 'W', 'X', 'Y', 'Z' }; - static const QVector<char> colorSuffixesRGB = { 'R', 'G', 'B' }; - static const QVector<char> colorSuffixesRGBA = { 'R', 'G', 'B', 'A' }; -#else - static const QVector<char> standardSuffixes = (QVector<char>() << 'X' << 'Y' << 'Z' << 'W'); - static const QVector<char> quaternionSuffixes = (QVector<char>() << 'W' << 'X' << 'Y' << 'Z'); - static const QVector<char> colorSuffixesRGB = (QVector<char>() << 'R' << 'G' << 'B'); - static const QVector<char> colorSuffixesRGBA = (QVector<char>() << 'R' << 'G' << 'B' << 'A'); -#endif + static const QList<char> standardSuffixes = { 'X', 'Y', 'Z', 'W' }; + static const QList<char> quaternionSuffixes = { 'W', 'X', 'Y', 'Z' }; + static const QList<char> colorSuffixesRGB = { 'R', 'G', 'B' }; + static const QList<char> colorSuffixesRGBA = { 'R', 'G', 'B', 'A' }; switch (dataType) { case QVariant::Quaternion: @@ -189,7 +182,7 @@ ComponentIndices channelComponentsToIndices(const Channel &channel, ComponentIndices channelComponentsToIndicesHelper(const Channel &channel, int expectedComponentCount, int offset, - const QVector<char> &suffixes) + const QList<char> &suffixes) { const int actualComponentCount = channel.channelComponents.size(); if (actualComponentCount != expectedComponentCount) { @@ -200,7 +193,7 @@ ComponentIndices channelComponentsToIndicesHelper(const Channel &channel, ComponentIndices indices(expectedComponentCount); // Generate the set of channel suffixes - QVector<char> channelSuffixes; + QList<char> channelSuffixes; channelSuffixes.reserve(expectedComponentCount); for (int i = 0; i < expectedComponentCount; ++i) { const QString &componentName = channel.channelComponents[i].name; @@ -234,14 +227,14 @@ ComponentIndices channelComponentsToIndicesHelper(const Channel &channel, ClipResults evaluateClipAtLocalTime(AnimationClip *clip, float localTime) { - QVector<float> channelResults; + QList<float> channelResults; Q_ASSERT(clip); // Ensure we have enough storage to hold the evaluations channelResults.resize(clip->channelCount()); // Iterate over channels and evaluate the fcurves - const QVector<Channel> &channels = clip->channels(); + const QList<Channel> &channels = clip->channels(); int i = 0; for (const Channel &channel : channels) { if (channel.name.contains(QStringLiteral("Rotation")) && @@ -337,7 +330,7 @@ ClipResults evaluateClipAtPhase(AnimationClip *clip, float phase) template<typename Container> Container mapChannelResultsToContainer(const MappingData &mappingData, - const QVector<float> &channelResults) + const QList<float> &channelResults) { Container r; r.reserve(channelResults.size()); @@ -349,9 +342,9 @@ Container mapChannelResultsToContainer(const MappingData &mappingData, return r; } -QVariant buildPropertyValue(const MappingData &mappingData, const QVector<float> &channelResults) +QVariant buildPropertyValue(const MappingData &mappingData, const QList<float> &channelResults) { - const int vectorOfFloatType = qMetaTypeId<QVector<float>>(); + const int vectorOfFloatType = qMetaTypeId<QList<float>>(); if (mappingData.type == vectorOfFloatType) return QVariant::fromValue(channelResults); @@ -416,8 +409,8 @@ QVariant buildPropertyValue(const MappingData &mappingData, const QVector<float> } AnimationRecord prepareAnimationRecord(Qt3DCore::QNodeId animatorId, - const QVector<MappingData> &mappingDataVec, - const QVector<float> &channelResults, + const QList<MappingData> &mappingDataVec, + const QList<float> &channelResults, bool finalFrame, float normalizedLocalTime) { @@ -475,10 +468,10 @@ AnimationRecord prepareAnimationRecord(Qt3DCore::QNodeId animatorId, return record; } -QVector<AnimationCallbackAndValue> prepareCallbacks(const QVector<MappingData> &mappingDataVec, - const QVector<float> &channelResults) +QList<AnimationCallbackAndValue> prepareCallbacks(const QList<MappingData> &mappingDataVec, + const QList<float> &channelResults) { - QVector<AnimationCallbackAndValue> callbacks; + QList<AnimationCallbackAndValue> callbacks; for (const MappingData &mappingData : mappingDataVec) { if (!mappingData.callback) continue; @@ -498,10 +491,10 @@ QVector<AnimationCallbackAndValue> prepareCallbacks(const QVector<MappingData> & // buildRequiredChannelsAndTypes() and assignChannelComponentIndices(). We are // currently repeating the iteration over mappings and extracting/generating // channel names, types and joint indices. -QVector<MappingData> buildPropertyMappings(const QVector<ChannelMapping*> &channelMappings, - const QVector<ChannelNameAndType> &channelNamesAndTypes, - const QVector<ComponentIndices> &channelComponentIndices, - const QVector<QBitArray> &sourceClipMask) +QList<MappingData> buildPropertyMappings(const QList<ChannelMapping*> &channelMappings, + const QList<ChannelNameAndType> &channelNamesAndTypes, + const QList<ComponentIndices> &channelComponentIndices, + const QList<QBitArray> &sourceClipMask) { // Accumulate the required number of mappings int maxMappingDatas = 0; @@ -519,7 +512,7 @@ QVector<MappingData> buildPropertyMappings(const QVector<ChannelMapping*> &chann } } } - QVector<MappingData> mappingDataVec; + QList<MappingData> mappingDataVec; mappingDataVec.reserve(maxMappingDatas); // Iterate over the mappings @@ -564,7 +557,7 @@ QVector<MappingData> buildPropertyMappings(const QVector<ChannelMapping*> &chann } case ChannelMapping::SkeletonMappingType: { - const QVector<ChannelNameAndType> jointProperties + const QList<ChannelNameAndType> jointProperties = { { QLatin1String("Location"), static_cast<int>(QVariant::Vector3D), Translation }, { QLatin1String("Rotation"), static_cast<int>(QVariant::Quaternion), Rotation }, { QLatin1String("Scale"), static_cast<int>(QVariant::Vector3D), Scale } }; @@ -628,15 +621,15 @@ QVector<MappingData> buildPropertyMappings(const QVector<ChannelMapping*> &chann return mappingDataVec; } -QVector<ChannelNameAndType> buildRequiredChannelsAndTypes(Handler *handler, +QList<ChannelNameAndType> buildRequiredChannelsAndTypes(Handler *handler, const ChannelMapper *mapper) { ChannelMappingManager *mappingManager = handler->channelMappingManager(); - const QVector<Qt3DCore::QNodeId> mappingIds = mapper->mappingIds(); + const QList<Qt3DCore::QNodeId> mappingIds = mapper->mappingIds(); // Reserve enough storage assuming each mapping is for a different channel. // May be overkill but avoids potential for multiple allocations - QVector<ChannelNameAndType> namesAndTypes; + QList<ChannelNameAndType> namesAndTypes; namesAndTypes.reserve(mappingIds.size()); // Iterate through the mappings and add ones not already used by an earlier mapping. @@ -667,7 +660,7 @@ QVector<ChannelNameAndType> buildRequiredChannelsAndTypes(Handler *handler, case ChannelMapping::SkeletonMappingType: { // Add an entry for each scale/rotation/translation property of each joint index // of the target skeleton. - const QVector<ChannelNameAndType> jointProperties + const QList<ChannelNameAndType> jointProperties = { { QLatin1String("Location"), static_cast<int>(QVariant::Vector3D), Translation }, { QLatin1String("Rotation"), static_cast<int>(QVariant::Quaternion), Rotation }, { QLatin1String("Scale"), static_cast<int>(QVariant::Vector3D), Scale } }; @@ -696,9 +689,9 @@ QVector<ChannelNameAndType> buildRequiredChannelsAndTypes(Handler *handler, return namesAndTypes; } -QVector<ComponentIndices> assignChannelComponentIndices(const QVector<ChannelNameAndType> &namesAndTypes) +QList<ComponentIndices> assignChannelComponentIndices(const QList<ChannelNameAndType> &namesAndTypes) { - QVector<ComponentIndices> channelComponentIndices; + QList<ComponentIndices> channelComponentIndices; channelComponentIndices.reserve(namesAndTypes.size()); int baseIndex = 0; @@ -718,7 +711,7 @@ QVector<ComponentIndices> assignChannelComponentIndices(const QVector<ChannelNam return channelComponentIndices; } -QVector<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler, +QList<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler, Qt3DCore::QNodeId blendTreeRootId) { Q_ASSERT(handler); @@ -728,7 +721,7 @@ QVector<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler, ClipBlendNodeManager *nodeManager = handler->clipBlendNodeManager(); // Visit the tree in a pre-order manner and collect the dependencies - QVector<Qt3DCore::QNodeId> clipIds; + QList<Qt3DCore::QNodeId> clipIds; ClipBlendNodeVisitor visitor(nodeManager, ClipBlendNodeVisitor::PreOrder, ClipBlendNodeVisitor::VisitOnlyDependencies); @@ -756,8 +749,8 @@ QVector<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler, return clipIds; } -ClipFormat generateClipFormatIndices(const QVector<ChannelNameAndType> &targetChannels, - const QVector<ComponentIndices> &targetIndices, +ClipFormat generateClipFormatIndices(const QList<ChannelNameAndType> &targetChannels, + const QList<ComponentIndices> &targetIndices, const AnimationClip *clip) { Q_ASSERT(targetChannels.size() == targetIndices.size()); @@ -871,10 +864,10 @@ ClipResults evaluateBlendTree(Handler *handler, return blendTreeRootNode->clipResults(animatorId); } -QVector<float> defaultValueForChannel(Handler *handler, +QList<float> defaultValueForChannel(Handler *handler, const ChannelNameAndType &channelDescription) { - QVector<float> result; + QList<float> result; // Does the channel repesent a joint in a skeleton or is it a general channel? ChannelMappingManager *mappingManager = handler->channelMappingManager(); @@ -921,7 +914,7 @@ QVector<float> defaultValueForChannel(Handler *handler, // Everything else gets all zeros const int componentCount = mapping->componentCount(); - result = QVector<float>(componentCount, 0.0f); + result = QList<float>(componentCount, 0.0f); break; } @@ -930,7 +923,7 @@ QVector<float> defaultValueForChannel(Handler *handler, return result; } -void applyComponentDefaultValues(const QVector<ComponentValue> &componentDefaults, +void applyComponentDefaultValues(const QList<ComponentValue> &componentDefaults, ClipResults &formattedClipResults) { for (const auto &componentDefault : componentDefaults) diff --git a/src/animation/backend/animationutils_p.h b/src/animation/backend/animationutils_p.h index 0e74728c2..5f7bdf6be 100644 --- a/src/animation/backend/animationutils_p.h +++ b/src/animation/backend/animationutils_p.h @@ -71,7 +71,7 @@ class AnimationClip; class ChannelMapper; class ChannelMapping; -typedef QVector<int> ComponentIndices; +using ComponentIndices = QList<int>; enum JointTransformComponent { NoTransformComponent = 0, @@ -124,7 +124,7 @@ struct ClipEvaluationData bool isFinalFrame; }; -typedef QVector<float> ClipResults; +using ClipResults = QList<float>; struct ChannelNameAndType { @@ -225,10 +225,10 @@ struct ClipFormat // formattedComponentIndices in flat vectors. This will require a // way to look up the offset and number of elements for each channel. ComponentIndices sourceClipIndices; - QVector<QBitArray> sourceClipMask; - QVector<ComponentIndices> formattedComponentIndices; - QVector<ChannelNameAndType> namesAndTypes; - QVector<ComponentValue> defaultComponentValues; + QList<QBitArray> sourceClipMask; + QList<ComponentIndices> formattedComponentIndices; + QList<ChannelNameAndType> namesAndTypes; + QList<ComponentValue> defaultComponentValues; }; #ifndef QT_NO_DEBUG_STREAM @@ -277,16 +277,16 @@ struct AnimationRecord { }; Qt3DCore::QNodeId animatorId; - QVector<TargetChange> targetChanges; - QVector<QPair<Qt3DCore::QNodeId, QVector<Qt3DCore::Sqt>>> skeletonChanges; + QList<TargetChange> targetChanges; + QList<QPair<Qt3DCore::QNodeId, QList<Qt3DCore::Sqt>>> skeletonChanges; float normalizedTime = -1.f; bool finalFrame = false; }; Q_AUTOTEST_EXPORT AnimationRecord prepareAnimationRecord(Qt3DCore::QNodeId animatorId, - const QVector<MappingData> &mappingDataVec, - const QVector<float> &channelResults, + const QList<MappingData> &mappingDataVec, + const QList<float> &channelResults, bool finalFrame, float normalizedLocalTime); @@ -347,7 +347,7 @@ Q_AUTOTEST_EXPORT ComponentIndices channelComponentsToIndicesHelper(const Channel &channelGroup, int expectedComponentCount, int offset, - const QVector<char> &suffixes); + const QList<char> &suffixes); Q_AUTOTEST_EXPORT ClipResults evaluateClipAtLocalTime(AnimationClip *clip, @@ -358,21 +358,21 @@ ClipResults evaluateClipAtPhase(AnimationClip *clip, float phase); Q_AUTOTEST_EXPORT -QVector<AnimationCallbackAndValue> prepareCallbacks(const QVector<MappingData> &mappingDataVec, - const QVector<float> &channelResults); +QList<AnimationCallbackAndValue> prepareCallbacks(const QList<MappingData> &mappingDataVec, + const QList<float> &channelResults); Q_AUTOTEST_EXPORT -QVector<MappingData> buildPropertyMappings(const QVector<ChannelMapping *> &channelMappings, - const QVector<ChannelNameAndType> &channelNamesAndTypes, - const QVector<ComponentIndices> &channelComponentIndices, - const QVector<QBitArray> &sourceClipMask); +QList<MappingData> buildPropertyMappings(const QList<ChannelMapping *> &channelMappings, + const QList<ChannelNameAndType> &channelNamesAndTypes, + const QList<ComponentIndices> &channelComponentIndices, + const QList<QBitArray> &sourceClipMask); Q_AUTOTEST_EXPORT -QVector<ChannelNameAndType> buildRequiredChannelsAndTypes(Handler *handler, - const ChannelMapper *mapper); +QList<ChannelNameAndType> buildRequiredChannelsAndTypes(Handler *handler, + const ChannelMapper *mapper); Q_AUTOTEST_EXPORT -QVector<ComponentIndices> assignChannelComponentIndices(const QVector<ChannelNameAndType> &namesAndTypes); +QList<ComponentIndices> assignChannelComponentIndices(const QList<ChannelNameAndType> &namesAndTypes); Q_AUTOTEST_EXPORT double localTimeFromElapsedTime(double t_current_local, double t_elapsed_global, @@ -385,12 +385,12 @@ double phaseFromElapsedTime(double t_current_local, double t_elapsed_global, int loopCount, int ¤tLoop); Q_AUTOTEST_EXPORT -QVector<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler, +QList<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler, Qt3DCore::QNodeId blendTreeRootId); Q_AUTOTEST_EXPORT -ClipFormat generateClipFormatIndices(const QVector<ChannelNameAndType> &targetChannels, - const QVector<ComponentIndices> &targetIndices, +ClipFormat generateClipFormatIndices(const QList<ChannelNameAndType> &targetChannels, + const QList<ComponentIndices> &targetIndices, const AnimationClip *clip); Q_AUTOTEST_EXPORT @@ -403,10 +403,10 @@ ClipResults evaluateBlendTree(Handler *handler, Qt3DCore::QNodeId blendNodeId); Q_AUTOTEST_EXPORT -QVector<float> defaultValueForChannel(Handler *handler, const ChannelNameAndType &channelDescription); +QList<float> defaultValueForChannel(Handler *handler, const ChannelNameAndType &channelDescription); Q_AUTOTEST_EXPORT -void applyComponentDefaultValues(const QVector<ComponentValue> &componentDefaults, +void applyComponentDefaultValues(const QList<ComponentValue> &componentDefaults, ClipResults &formattedClipResults); } // Animation diff --git a/src/animation/backend/blendedclipanimator_p.h b/src/animation/backend/blendedclipanimator_p.h index 2396cdd74..795aa5b6a 100644 --- a/src/animation/backend/blendedclipanimator_p.h +++ b/src/animation/backend/blendedclipanimator_p.h @@ -89,8 +89,8 @@ public: int currentLoop() const { return m_currentLoop; } void setCurrentLoop(int currentLoop) { m_currentLoop = currentLoop; } - void setMappingData(const QVector<MappingData> &mappingData) { m_mappingData = mappingData; } - QVector<MappingData> mappingData() const { return m_mappingData; } + void setMappingData(const QList<MappingData> &mappingData) { m_mappingData = mappingData; } + QList<MappingData> mappingData() const { return m_mappingData; } void animationClipMarkedDirty() { setDirty(Handler::BlendedClipAnimatorDirty); } @@ -123,7 +123,7 @@ private: float m_normalizedLocalTime; float m_lastNormalizedLocalTime; - QVector<MappingData> m_mappingData; + QList<MappingData> m_mappingData; }; } // namespace Animation diff --git a/src/animation/backend/buildblendtreesjob.cpp b/src/animation/backend/buildblendtreesjob.cpp index b4cc04323..aeaaa8c11 100644 --- a/src/animation/backend/buildblendtreesjob.cpp +++ b/src/animation/backend/buildblendtreesjob.cpp @@ -55,7 +55,7 @@ BuildBlendTreesJob::BuildBlendTreesJob() SET_JOB_RUN_STAT_TYPE(this, JobTypes::BuildBlendTree, 0) } -void BuildBlendTreesJob::setBlendedClipAnimators(const QVector<HBlendedClipAnimator> &blendedClipAnimatorHandles) +void BuildBlendTreesJob::setBlendedClipAnimators(const QList<HBlendedClipAnimator> &blendedClipAnimatorHandles) { m_blendedClipAnimatorHandles = blendedClipAnimatorHandles; BlendedClipAnimatorManager *blendedClipAnimatorManager = m_handler->blendedClipAnimatorManager(); @@ -89,23 +89,23 @@ void BuildBlendTreesJob::run() const ChannelMapper *mapper = m_handler->channelMapperManager()->lookupResource(blendClipAnimator->mapperId()); if (!mapper) continue; - const QVector<ChannelNameAndType> channelNamesAndTypes + const QList<ChannelNameAndType> channelNamesAndTypes = buildRequiredChannelsAndTypes(m_handler, mapper); - const QVector<ComponentIndices> channelComponentIndices + const QList<ComponentIndices> channelComponentIndices = assignChannelComponentIndices(channelNamesAndTypes); // Find the leaf value nodes of the blend tree and for each of them // create a set of format indices that can later be used to map the // raw ClipResults resulting from evaluating an animation clip to the // layout used by the blend tree for this animator - QVector<QBitArray> blendTreeChannelMask; - const QVector<Qt3DCore::QNodeId> valueNodeIds + QList<QBitArray> blendTreeChannelMask; + const QList<Qt3DCore::QNodeId> valueNodeIds = gatherValueNodesToEvaluate(m_handler, blendClipAnimator->blendTreeRootId()); // Store the clip value nodes to avoid further lookups below. // TODO: Refactor this next block into a function in animationutils.cpp that takes - // a QVector<QClipBlendValue*> as input. - QVector<ClipBlendValue *> valueNodes; + // a QList<QClipBlendValue*> as input. + QList<ClipBlendValue *> valueNodes; valueNodes.reserve(valueNodeIds.size()); for (const auto valueNodeId : valueNodeIds) { ClipBlendValue *valueNode @@ -166,8 +166,8 @@ void BuildBlendTreesJob::run() // If we get to here then we need to obtain a default value // for this channel and store it for later application to any // missing components of this channel. - const QVector<float> defaultValue = defaultValueForChannel(m_handler, - f.namesAndTypes[i]); + const QList<float> defaultValue = defaultValueForChannel(m_handler, + f.namesAndTypes[i]); // Find the indices where we later need to inject these default // values and store them in the format. @@ -181,8 +181,8 @@ void BuildBlendTreesJob::run() // Finally, build the mapping data vector for this blended clip animator. This // gets used during the final stage of evaluation when sending the property changes // out to the targets of the animation. We do the costly work once up front. - const QVector<Qt3DCore::QNodeId> channelMappingIds = mapper->mappingIds(); - QVector<ChannelMapping *> channelMappings; + const QList<Qt3DCore::QNodeId> channelMappingIds = mapper->mappingIds(); + QList<ChannelMapping *> channelMappings; channelMappings.reserve(channelMappingIds.size()); for (const auto mappingId : channelMappingIds) { ChannelMapping *mapping = m_handler->channelMappingManager()->lookupResource(mappingId); @@ -190,7 +190,7 @@ void BuildBlendTreesJob::run() channelMappings.push_back(mapping); } - const QVector<MappingData> mappingDataVec + const QList<MappingData> mappingDataVec = buildPropertyMappings(channelMappings, channelNamesAndTypes, channelComponentIndices, diff --git a/src/animation/backend/buildblendtreesjob_p.h b/src/animation/backend/buildblendtreesjob_p.h index a14552cb9..c822e40f2 100644 --- a/src/animation/backend/buildblendtreesjob_p.h +++ b/src/animation/backend/buildblendtreesjob_p.h @@ -66,13 +66,13 @@ public: void setHandler(Handler *handler) { m_handler = handler; } Handler *handler() const { return m_handler; } - void setBlendedClipAnimators(const QVector<HBlendedClipAnimator> &blendedClipAnimatorHandles); + void setBlendedClipAnimators(const QList<HBlendedClipAnimator> &blendedClipAnimatorHandles); protected: void run() override; private: - QVector<HBlendedClipAnimator> m_blendedClipAnimatorHandles; + QList<HBlendedClipAnimator> m_blendedClipAnimatorHandles; Handler *m_handler; }; diff --git a/src/animation/backend/channelmapper_p.h b/src/animation/backend/channelmapper_p.h index 45a3e789e..a2e9065a6 100644 --- a/src/animation/backend/channelmapper_p.h +++ b/src/animation/backend/channelmapper_p.h @@ -53,7 +53,7 @@ #include <Qt3DCore/qnodeid.h> -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE @@ -71,10 +71,10 @@ public: void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; - void setMappingIds(const QVector<Qt3DCore::QNodeId> &mappingIds) { m_mappingIds = mappingIds; } - QVector<Qt3DCore::QNodeId> mappingIds() const { return m_mappingIds; } + void setMappingIds(const QList<Qt3DCore::QNodeId> &mappingIds) { m_mappingIds = mappingIds; } + QList<Qt3DCore::QNodeId> mappingIds() const { return m_mappingIds; } - QVector<ChannelMapping*> mappings() const + QList<ChannelMapping*> mappings() const { if (m_isDirty) updateMappings(); @@ -84,10 +84,10 @@ public: private: void updateMappings() const; - QVector<Qt3DCore::QNodeId> m_mappingIds; + QList<Qt3DCore::QNodeId> m_mappingIds; // Cached data - mutable QVector<ChannelMapping*> m_mappings; + mutable QList<ChannelMapping*> m_mappings; mutable bool m_isDirty; }; diff --git a/src/animation/backend/clipanimator_p.h b/src/animation/backend/clipanimator_p.h index 65fc6bdc8..25e4af3d0 100644 --- a/src/animation/backend/clipanimator_p.h +++ b/src/animation/backend/clipanimator_p.h @@ -85,8 +85,8 @@ public: // Called by jobs bool canRun() const { return !m_clipId.isNull() && !m_mapperId.isNull(); } - void setMappingData(const QVector<MappingData> &mappingData) { m_mappingData = mappingData; } - QVector<MappingData> mappingData() const { return m_mappingData; } + void setMappingData(const QList<MappingData> &mappingData) { m_mappingData = mappingData; } + QList<MappingData> mappingData() const { return m_mappingData; } void setStartTime(qint64 globalTime) { m_lastGlobalTimeNS = globalTime; } @@ -122,7 +122,7 @@ private: // Working state qint64 m_lastGlobalTimeNS; double m_lastLocalTime; - QVector<MappingData> m_mappingData; + QList<MappingData> m_mappingData; int m_currentLoop; ClipFormat m_clipFormat; diff --git a/src/animation/backend/clipblendnode.cpp b/src/animation/backend/clipblendnode.cpp index 50e251398..37887664b 100644 --- a/src/animation/backend/clipblendnode.cpp +++ b/src/animation/backend/clipblendnode.cpp @@ -86,7 +86,7 @@ ClipResults ClipBlendNode::clipResults(Qt3DCore::QNodeId animatorId) const } /* - \fn QVector<Qt3DCore::QNodeId> ClipBlendNode::currentDependencyIds() const + \fn QList<Qt3DCore::QNodeId> ClipBlendNode::currentDependencyIds() const \internal Each subclass of ClipBlendNode must implement this function such that it @@ -108,7 +108,7 @@ ClipResults ClipBlendNode::clipResults(Qt3DCore::QNodeId animatorId) const */ /* - \fn QVector<Qt3DCore::QNodeId> ClipBlendNode::allDependencyIds() const + \fn QList<Qt3DCore::QNodeId> ClipBlendNode::allDependencyIds() const \internal Similar to currentDependencyIds() but returns the ids of all potential @@ -130,9 +130,9 @@ ClipResults ClipBlendNode::clipResults(Qt3DCore::QNodeId animatorId) const void ClipBlendNode::blend(Qt3DCore::QNodeId animatorId) { // Obtain the clip results from each of the dependencies - const QVector<Qt3DCore::QNodeId> dependencyNodeIds = currentDependencyIds(); + const QList<Qt3DCore::QNodeId> dependencyNodeIds = currentDependencyIds(); const int dependencyCount = dependencyNodeIds.size(); - QVector<ClipResults> blendData; + QList<ClipResults> blendData; blendData.reserve(dependencyCount); for (const auto dependencyId : dependencyNodeIds) { ClipBlendNode *dependencyNode = clipBlendNodeManager()->lookupNode(dependencyId); diff --git a/src/animation/backend/clipblendnode_p.h b/src/animation/backend/clipblendnode_p.h index e650270cd..0e2c2880d 100644 --- a/src/animation/backend/clipblendnode_p.h +++ b/src/animation/backend/clipblendnode_p.h @@ -82,21 +82,21 @@ public: void setClipResults(Qt3DCore::QNodeId animatorId, const ClipResults &clipResults); ClipResults clipResults(Qt3DCore::QNodeId animatorId) const; - virtual QVector<Qt3DCore::QNodeId> allDependencyIds() const = 0; - virtual QVector<Qt3DCore::QNodeId> currentDependencyIds() const = 0; + virtual QList<Qt3DCore::QNodeId> allDependencyIds() const = 0; + virtual QList<Qt3DCore::QNodeId> currentDependencyIds() const = 0; virtual double duration() const = 0; protected: explicit ClipBlendNode(BlendType blendType); - virtual ClipResults doBlend(const QVector<ClipResults> &blendData) const = 0; + virtual ClipResults doBlend(const QList<ClipResults> &blendData) const = 0; private: ClipBlendNodeManager *m_manager; BlendType m_blendType; // Store the results of evaluations indexed by animator id - QVector<Qt3DCore::QNodeId> m_animatorIds; - QVector<ClipResults> m_clipResults; + QList<Qt3DCore::QNodeId> m_animatorIds; + QList<ClipResults> m_clipResults; }; template<typename Backend, typename Frontend> diff --git a/src/animation/backend/clipblendvalue.cpp b/src/animation/backend/clipblendvalue.cpp index dc63d4367..768acddfe 100644 --- a/src/animation/backend/clipblendvalue.cpp +++ b/src/animation/backend/clipblendvalue.cpp @@ -62,7 +62,7 @@ void ClipBlendValue::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firs m_clipId = Qt3DCore::qIdForNode(node->clip()); } -ClipResults ClipBlendValue::doBlend(const QVector<ClipResults> &blendData) const +ClipResults ClipBlendValue::doBlend(const QList<ClipResults> &blendData) const { // Should never be called for the value node Q_UNUSED(blendData); diff --git a/src/animation/backend/clipblendvalue_p.h b/src/animation/backend/clipblendvalue_p.h index 8a0f93d3d..04d845543 100644 --- a/src/animation/backend/clipblendvalue_p.h +++ b/src/animation/backend/clipblendvalue_p.h @@ -66,12 +66,12 @@ public: void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; - inline QVector<Qt3DCore::QNodeId> allDependencyIds() const override + inline QList<Qt3DCore::QNodeId> allDependencyIds() const override { return currentDependencyIds(); } - inline QVector<Qt3DCore::QNodeId> currentDependencyIds() const override + inline QList<Qt3DCore::QNodeId> currentDependencyIds() const override { return {}; } @@ -83,13 +83,13 @@ public: const ClipFormat &clipFormat(Qt3DCore::QNodeId animatorId) const; protected: - ClipResults doBlend(const QVector<ClipResults> &blendData) const override; + ClipResults doBlend(const QList<ClipResults> &blendData) const override; private: Qt3DCore::QNodeId m_clipId; - QVector<Qt3DCore::QNodeId> m_animatorIds; - QVector<ClipFormat> m_clipFormats; + QList<Qt3DCore::QNodeId> m_animatorIds; + QList<ClipFormat> m_clipFormats; }; } // namespace Animation diff --git a/src/animation/backend/evaluateblendclipanimatorjob.cpp b/src/animation/backend/evaluateblendclipanimatorjob.cpp index 69df26992..dad5be6ab 100644 --- a/src/animation/backend/evaluateblendclipanimatorjob.cpp +++ b/src/animation/backend/evaluateblendclipanimatorjob.cpp @@ -77,7 +77,7 @@ void EvaluateBlendClipAnimatorJob::run() } Qt3DCore::QNodeId blendTreeRootId = blendedClipAnimator->blendTreeRootId(); - const QVector<Qt3DCore::QNodeId> valueNodeIdsToEvaluate = gatherValueNodesToEvaluate(m_handler, blendTreeRootId); + const QList<Qt3DCore::QNodeId> valueNodeIdsToEvaluate = gatherValueNodesToEvaluate(m_handler, blendTreeRootId); // Calculate the resulting duration of the blend tree based upon its current state ClipBlendNodeManager *blendNodeManager = m_handler->clipBlendNodeManager(); @@ -129,7 +129,7 @@ void EvaluateBlendClipAnimatorJob::run() // Prepare the change record const bool finalFrame = isFinalFrame(localTime, duration, animatorData.currentLoop, animatorData.loopCount, animatorData.playbackRate); - const QVector<MappingData> mappingData = blendedClipAnimator->mappingData(); + const QList<MappingData> mappingData = blendedClipAnimator->mappingData(); auto record = prepareAnimationRecord(blendedClipAnimator->peerId(), mappingData, blendedResults, diff --git a/src/animation/backend/fcurve_p.h b/src/animation/backend/fcurve_p.h index 4c5cfb351..1a1b6dca6 100644 --- a/src/animation/backend/fcurve_p.h +++ b/src/animation/backend/fcurve_p.h @@ -54,7 +54,7 @@ #include <Qt3DAnimation/qchannel.h> #include <Qt3DAnimation/qchannelcomponent.h> #include <Qt3DAnimation/qkeyframe.h> -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> #ifndef QT_NO_DEBUG_STREAM #include <QtCore/qdebug.h> @@ -91,8 +91,8 @@ public: void setFromQChannelComponent(const QChannelComponent &qcc); private: - QVector<float> m_localTimes; - QVector<Keyframe> m_keyframes; + QList<float> m_localTimes; + QList<Keyframe> m_keyframes; FunctionRangeFinder m_rangeFinder; }; @@ -149,7 +149,7 @@ struct Channel { QString name; int jointIndex = -1; - QVector<ChannelComponent> channelComponents; + QList<ChannelComponent> channelComponents; void read(const QJsonObject &json); void setFromQChannel(const QChannel &qch); diff --git a/src/animation/backend/findrunningclipanimatorsjob.cpp b/src/animation/backend/findrunningclipanimatorsjob.cpp index 1005914c7..4b75d9180 100644 --- a/src/animation/backend/findrunningclipanimatorsjob.cpp +++ b/src/animation/backend/findrunningclipanimatorsjob.cpp @@ -53,7 +53,7 @@ FindRunningClipAnimatorsJob::FindRunningClipAnimatorsJob() SET_JOB_RUN_STAT_TYPE(this, JobTypes::FindRunningClipAnimator, 0) } -void FindRunningClipAnimatorsJob::setDirtyClipAnimators(const QVector<HClipAnimator> &clipAnimatorHandles) +void FindRunningClipAnimatorsJob::setDirtyClipAnimators(const QList<HClipAnimator> &clipAnimatorHandles) { m_clipAnimatorHandles = clipAnimatorHandles; } @@ -85,11 +85,11 @@ void FindRunningClipAnimatorsJob::run() // blended clip animator for consistency and ease of maintenance. const ChannelMapper *mapper = m_handler->channelMapperManager()->lookupResource(clipAnimator->mapperId()); Q_ASSERT(mapper); - const QVector<ChannelMapping *> channelMappings = mapper->mappings(); + const QList<ChannelMapping *> channelMappings = mapper->mappings(); - const QVector<ChannelNameAndType> channelNamesAndTypes + const QList<ChannelNameAndType> channelNamesAndTypes = buildRequiredChannelsAndTypes(m_handler, mapper); - const QVector<ComponentIndices> channelComponentIndices + const QList<ComponentIndices> channelComponentIndices = assignChannelComponentIndices(channelNamesAndTypes); const AnimationClip *clip = m_handler->animationClipLoaderManager()->lookupResource(clipAnimator->clipId()); @@ -99,7 +99,7 @@ void FindRunningClipAnimatorsJob::run() clip); clipAnimator->setClipFormat(format); - const QVector<MappingData> mappingData = buildPropertyMappings(channelMappings, + const QList<MappingData> mappingData = buildPropertyMappings(channelMappings, channelNamesAndTypes, format.formattedComponentIndices, format.sourceClipMask); diff --git a/src/animation/backend/findrunningclipanimatorsjob_p.h b/src/animation/backend/findrunningclipanimatorsjob_p.h index f0e30e80c..f1d5d1701 100644 --- a/src/animation/backend/findrunningclipanimatorsjob_p.h +++ b/src/animation/backend/findrunningclipanimatorsjob_p.h @@ -50,7 +50,7 @@ #include <Qt3DCore/qaspectjob.h> #include <Qt3DAnimation/private/handle_types_p.h> -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> #if defined(QT_BUILD_INTERNAL) class tst_FindRunningClipAnimatorsJob; @@ -71,13 +71,13 @@ public: void setHandler(Handler *handler) { m_handler = handler; } Handler *handler() const { return m_handler; } - void setDirtyClipAnimators(const QVector<HClipAnimator> &animationClipHandles); + void setDirtyClipAnimators(const QList<HClipAnimator> &animationClipHandles); protected: void run() override; private: - QVector<HClipAnimator> m_clipAnimatorHandles; + QList<HClipAnimator> m_clipAnimatorHandles; Handler *m_handler; #if defined(QT_BUILD_INTERNAL) diff --git a/src/animation/backend/functionrangefinder.cpp b/src/animation/backend/functionrangefinder.cpp index 8c0e30f4a..af695b7c1 100644 --- a/src/animation/backend/functionrangefinder.cpp +++ b/src/animation/backend/functionrangefinder.cpp @@ -69,7 +69,7 @@ namespace Animation { If the previous results are uncorrelated, a simple bisection is used. */ -FunctionRangeFinder::FunctionRangeFinder(const QVector<float> &x) +FunctionRangeFinder::FunctionRangeFinder(const QList<float> &x) : m_x(x) , m_previousLowerBound(0) , m_correlated(0) diff --git a/src/animation/backend/functionrangefinder_p.h b/src/animation/backend/functionrangefinder_p.h index bea9a2e2f..5df05bea4 100644 --- a/src/animation/backend/functionrangefinder_p.h +++ b/src/animation/backend/functionrangefinder_p.h @@ -48,7 +48,7 @@ // We mean it. // -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> #include <cmath> #include <cstdlib> @@ -61,7 +61,7 @@ namespace Animation { class Q_AUTOTEST_EXPORT FunctionRangeFinder { public: - FunctionRangeFinder(const QVector<float> &x); + FunctionRangeFinder(const QList<float> &x); inline int findLowerBound(float x) const { return m_correlated ? hunt(x) : locate(x); } @@ -81,7 +81,7 @@ private: int locate(float x) const; int hunt(float x) const; - const QVector<float> &m_x; + const QList<float> &m_x; mutable int m_previousLowerBound; mutable bool m_correlated; int m_rangeSize; diff --git a/src/animation/backend/gltfimporter.cpp b/src/animation/backend/gltfimporter.cpp index 82401dd5e..06ff6be67 100644 --- a/src/animation/backend/gltfimporter.cpp +++ b/src/animation/backend/gltfimporter.cpp @@ -488,7 +488,7 @@ GLTFImporter::AnimationNameAndChannels GLTFImporter::createAnimationData(int ani nameAndChannels.name = animation.name; // Create node index to joint index lookup tables for each skin - QVector<QHash<int, int>> nodeIndexToJointIndexMaps; + QList<QHash<int, int>> nodeIndexToJointIndexMaps; nodeIndexToJointIndexMaps.reserve(m_skins.size()); for (const auto &skin : m_skins) nodeIndexToJointIndexMaps.push_back(createNodeIndexToJointIndexMap(skin)); @@ -546,7 +546,7 @@ GLTFImporter::AnimationNameAndChannels GLTFImporter::createAnimationData(int ani // Get the key frame times first as these are common to all components of the // key frame values. const int keyFrameCount = inputAccessor.count; - QVector<float> keyframeTimes(keyFrameCount); + QList<float> keyframeTimes(keyFrameCount); for (int i = 0; i < keyFrameCount; ++i) { const auto rawTimestamp = accessorData(sampler.inputAccessorIndex, i); keyframeTimes[i] = *reinterpret_cast<const float*>(rawTimestamp.data); @@ -827,7 +827,7 @@ void GLTFImporter::setupNodeParentLinks() const int nodeCount = m_nodes.size(); for (int i = 0; i < nodeCount; ++i) { const Node &node = m_nodes[i]; - const QVector<int> &childNodeIndices = node.childNodeIndices; + const QList<int> &childNodeIndices = node.childNodeIndices; for (const auto childNodeIndex : childNodeIndices) { Q_ASSERT(childNodeIndex < m_nodes.size()); Node &childNode = m_nodes[childNodeIndex]; diff --git a/src/animation/backend/gltfimporter_p.h b/src/animation/backend/gltfimporter_p.h index ef0486181..c4da7b40f 100644 --- a/src/animation/backend/gltfimporter_p.h +++ b/src/animation/backend/gltfimporter_p.h @@ -58,7 +58,7 @@ #include <QJsonObject> #include <QJsonArray> #include <QJsonValue> -#include <QVector> +#include <QList> QT_BEGIN_NAMESPACE @@ -117,7 +117,7 @@ public: QString name; int inverseBindAccessorIndex; - QVector<int> jointNodeIndices; + QList<int> jointNodeIndices; }; class Channel @@ -158,8 +158,8 @@ public: explicit Animation(const QJsonObject &json); QString name; - QVector<Channel> channels; - QVector<Sampler> samplers; + QList<Channel> channels; + QList<Sampler> samplers; }; class Node @@ -169,7 +169,7 @@ public: explicit Node(const QJsonObject &json); Qt3DCore::Sqt localTransform; - QVector<int> childNodeIndices; + QList<int> childNodeIndices; QString name; int parentNodeIndex; int cameraIndex; @@ -180,12 +180,12 @@ public: GLTFImporter(); bool load(QIODevice *ioDev); - const QVector<Animation> animations() const { return m_animations; } + const QList<Animation> animations() const { return m_animations; } struct AnimationNameAndChannels { QString name; - QVector<Qt3DAnimation::Animation::Channel> channels; + QList<Qt3DAnimation::Animation::Channel> channels; }; AnimationNameAndChannels createAnimationData(int animationIndex, const QString &animationName = QString()) const; @@ -221,12 +221,12 @@ private: QJsonDocument m_json; QString m_basePath; - QVector<BufferData> m_bufferDatas; - QVector<BufferView> m_bufferViews; - QVector<AccessorData> m_accessors; - QVector<Skin> m_skins; - QVector<Animation> m_animations; - QVector<Node> m_nodes; + QList<BufferData> m_bufferDatas; + QList<BufferView> m_bufferViews; + QList<AccessorData> m_accessors; + QList<Skin> m_skins; + QList<Animation> m_animations; + QList<Node> m_nodes; }; } // namespace Animation diff --git a/src/animation/backend/handler.cpp b/src/animation/backend/handler.cpp index 939e58263..1b81f6aa1 100644 --- a/src/animation/backend/handler.cpp +++ b/src/animation/backend/handler.cpp @@ -143,7 +143,7 @@ void Handler::setBlendedClipAnimatorRunning(const HBlendedClipAnimator &handle, // The vectors may get outdated when the application removes/deletes an // animator component in the meantime. Recognize this. This should be // relatively infrequent so in most cases the vectors will not change at all. -void Handler::cleanupHandleList(QVector<HAnimationClip> *clips) +void Handler::cleanupHandleList(QList<HAnimationClip> *clips) { for (auto it = clips->begin(); it != clips->end(); ) { if (!m_animationClipLoaderManager->data(*it)) @@ -153,7 +153,7 @@ void Handler::cleanupHandleList(QVector<HAnimationClip> *clips) } } -void Handler::cleanupHandleList(QVector<HClipAnimator> *animators) +void Handler::cleanupHandleList(QList<HClipAnimator> *animators) { for (auto it = animators->begin(); it != animators->end(); ) { if (!m_clipAnimatorManager->data(*it)) @@ -163,7 +163,7 @@ void Handler::cleanupHandleList(QVector<HClipAnimator> *animators) } } -void Handler::cleanupHandleList(QVector<HBlendedClipAnimator> *animators) +void Handler::cleanupHandleList(QList<HBlendedClipAnimator> *animators) { for (auto it = animators->begin(); it != animators->end(); ) { if (!m_blendedClipAnimatorManager->data(*it)) @@ -215,7 +215,7 @@ std::vector<Qt3DCore::QAspectJobPtr> Handler::jobsToExecute(qint64 time) // Rebuild blending trees if a blend tree is dirty const bool hasBuildBlendTreesJob = !m_dirtyBlendedAnimators.isEmpty(); if (hasBuildBlendTreesJob) { - const QVector<HBlendedClipAnimator> dirtyBlendedAnimators = std::move(m_dirtyBlendedAnimators); + const QList<HBlendedClipAnimator> dirtyBlendedAnimators = std::move(m_dirtyBlendedAnimators); m_buildBlendTreesJob->setBlendedClipAnimators(dirtyBlendedAnimators); jobs.push_back(m_buildBlendTreesJob); } diff --git a/src/animation/backend/handler_p.h b/src/animation/backend/handler_p.h index cad1c568d..4f9f24091 100644 --- a/src/animation/backend/handler_p.h +++ b/src/animation/backend/handler_p.h @@ -105,10 +105,10 @@ public: void setDirty(DirtyFlag flag, Qt3DCore::QNodeId nodeId); void setClipAnimatorRunning(const HClipAnimator &handle, bool running); - QVector<HClipAnimator> runningClipAnimators() const { return m_runningClipAnimators; } + QList<HClipAnimator> runningClipAnimators() const { return m_runningClipAnimators; } void setBlendedClipAnimatorRunning(const HBlendedClipAnimator &handle, bool running); - QVector<HBlendedClipAnimator> runningBlenndedClipAnimators() const { return m_runningBlendedClipAnimators; } + QList<HBlendedClipAnimator> runningBlenndedClipAnimators() const { return m_runningBlendedClipAnimators; } AnimationClipLoaderManager *animationClipLoaderManager() const Q_DECL_NOTHROW { return m_animationClipLoaderManager.data(); } ClockManager *clockManager() const Q_DECL_NOTHROW { return m_clockManager.data(); } @@ -121,9 +121,9 @@ public: std::vector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time); - void cleanupHandleList(QVector<HAnimationClip> *clips); - void cleanupHandleList(QVector<HClipAnimator> *animators); - void cleanupHandleList(QVector<HBlendedClipAnimator> *animators); + void cleanupHandleList(QList<HAnimationClip> *clips); + void cleanupHandleList(QList<HClipAnimator> *animators); + void cleanupHandleList(QList<HBlendedClipAnimator> *animators); private: QMutex m_mutex; @@ -136,17 +136,17 @@ private: QScopedPointer<ClipBlendNodeManager> m_clipBlendNodeManager; QScopedPointer<SkeletonManager> m_skeletonManager; - QVector<HAnimationClip> m_dirtyAnimationClips; - QVector<HClipAnimator> m_dirtyClipAnimators; - QVector<HBlendedClipAnimator> m_dirtyBlendedAnimators; + QList<HAnimationClip> m_dirtyAnimationClips; + QList<HClipAnimator> m_dirtyClipAnimators; + QList<HBlendedClipAnimator> m_dirtyBlendedAnimators; - QVector<HClipAnimator> m_runningClipAnimators; - QVector<HBlendedClipAnimator> m_runningBlendedClipAnimators; + QList<HClipAnimator> m_runningClipAnimators; + QList<HBlendedClipAnimator> m_runningBlendedClipAnimators; QSharedPointer<LoadAnimationClipJob> m_loadAnimationClipJob; QSharedPointer<FindRunningClipAnimatorsJob> m_findRunningClipAnimatorsJob; - QVector<QSharedPointer<EvaluateClipAnimatorJob>> m_evaluateClipAnimatorJobs; - QVector<EvaluateBlendClipAnimatorJobPtr> m_evaluateBlendClipAnimatorJobs; + QList<QSharedPointer<EvaluateClipAnimatorJob>> m_evaluateClipAnimatorJobs; + QList<EvaluateBlendClipAnimatorJobPtr> m_evaluateBlendClipAnimatorJobs; BuildBlendTreesJobPtr m_buildBlendTreesJob; qint64 m_simulationTime; diff --git a/src/animation/backend/lerpclipblend.cpp b/src/animation/backend/lerpclipblend.cpp index b2ba2ff7e..ebf3c30e9 100644 --- a/src/animation/backend/lerpclipblend.cpp +++ b/src/animation/backend/lerpclipblend.cpp @@ -68,7 +68,7 @@ void LerpClipBlend::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool first m_endClipId = Qt3DCore::qIdForNode(node->endClip()); } -ClipResults LerpClipBlend::doBlend(const QVector<ClipResults> &blendData) const +ClipResults LerpClipBlend::doBlend(const QList<ClipResults> &blendData) const { Q_ASSERT(blendData.size() == 2); Q_ASSERT(blendData[0].size() == blendData[1].size()); diff --git a/src/animation/backend/lerpclipblend_p.h b/src/animation/backend/lerpclipblend_p.h index 61434af2c..027cbf331 100644 --- a/src/animation/backend/lerpclipblend_p.h +++ b/src/animation/backend/lerpclipblend_p.h @@ -73,12 +73,12 @@ public: void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) final; - inline QVector<Qt3DCore::QNodeId> allDependencyIds() const override + inline QList<Qt3DCore::QNodeId> allDependencyIds() const override { return currentDependencyIds(); } - inline QVector<Qt3DCore::QNodeId> currentDependencyIds() const override + inline QList<Qt3DCore::QNodeId> currentDependencyIds() const override { return { m_startClipId, m_endClipId }; } @@ -86,7 +86,7 @@ public: double duration() const override; protected: - ClipResults doBlend(const QVector<ClipResults> &blendData) const final; + ClipResults doBlend(const QList<ClipResults> &blendData) const final; private: Qt3DCore::QNodeId m_startClipId; diff --git a/src/animation/backend/loadanimationclipjob.cpp b/src/animation/backend/loadanimationclipjob.cpp index 93d4c2d9d..fd8f620a8 100644 --- a/src/animation/backend/loadanimationclipjob.cpp +++ b/src/animation/backend/loadanimationclipjob.cpp @@ -58,7 +58,7 @@ public: void postFrame(Qt3DCore::QAspectManager *manager) override; - QVector<AnimationClip *> m_updatedNodes; + QList<AnimationClip *> m_updatedNodes; }; LoadAnimationClipJob::LoadAnimationClipJob() @@ -69,7 +69,7 @@ LoadAnimationClipJob::LoadAnimationClipJob() SET_JOB_RUN_STAT_TYPE(this, JobTypes::LoadAnimationClip, 0) } -void LoadAnimationClipJob::addDirtyAnimationClips(const QVector<HAnimationClip> &animationClipHandles) +void LoadAnimationClipJob::addDirtyAnimationClips(const QList<HAnimationClip> &animationClipHandles) { for (const auto &handle : animationClipHandles) { if (!m_animationClipHandles.contains(handle)) diff --git a/src/animation/backend/loadanimationclipjob_p.h b/src/animation/backend/loadanimationclipjob_p.h index 07d78d416..bbe67f20e 100644 --- a/src/animation/backend/loadanimationclipjob_p.h +++ b/src/animation/backend/loadanimationclipjob_p.h @@ -50,7 +50,7 @@ #include <Qt3DCore/qaspectjob.h> #include <Qt3DAnimation/private/handle_types_p.h> -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE @@ -69,7 +69,7 @@ public: void setHandler(Handler *handler) { m_handler = handler; } Handler *handler() const { return m_handler; } - void addDirtyAnimationClips(const QVector<HAnimationClip> &animationClipHandles); + void addDirtyAnimationClips(const QList<HAnimationClip> &animationClipHandles); void clearDirtyAnimationClips(); protected: @@ -78,7 +78,7 @@ protected: private: Q_DECLARE_PRIVATE(LoadAnimationClipJob) - QVector<HAnimationClip> m_animationClipHandles; + QList<HAnimationClip> m_animationClipHandles; Handler *m_handler; }; diff --git a/src/animation/backend/skeleton_p.h b/src/animation/backend/skeleton_p.h index d44f8fc1c..a184921dd 100644 --- a/src/animation/backend/skeleton_p.h +++ b/src/animation/backend/skeleton_p.h @@ -64,7 +64,7 @@ public: void cleanup(); void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; - QVector<Qt3DCore::Sqt> joints() const { return m_jointLocalPoses; } + QList<Qt3DCore::Sqt> joints() const { return m_jointLocalPoses; } int jointCount() const { return m_jointLocalPoses.size(); } QString jointName(int jointIndex) const { return m_jointNames.at(jointIndex); } @@ -104,15 +104,15 @@ public: m_jointNames.resize(jointCount); m_jointLocalPoses.resize(jointCount); } - void setJointNames(const QVector<QString> &names) { m_jointNames = names; } - QVector<QString> jointNames() const { return m_jointNames; } - void setJointLocalPoses(const QVector<Qt3DCore::Sqt> &localPoses) { m_jointLocalPoses = localPoses; } - QVector<Qt3DCore::Sqt> jointLocalPoses() const { return m_jointLocalPoses; } + void setJointNames(const QList<QString> &names) { m_jointNames = names; } + QList<QString> jointNames() const { return m_jointNames; } + void setJointLocalPoses(const QList<Qt3DCore::Sqt> &localPoses) { m_jointLocalPoses = localPoses; } + QList<Qt3DCore::Sqt> jointLocalPoses() const { return m_jointLocalPoses; } #endif private: - QVector<QString> m_jointNames; - QVector<Qt3DCore::Sqt> m_jointLocalPoses; + QList<QString> m_jointNames; + QList<Qt3DCore::Sqt> m_jointLocalPoses; }; } // namespace Animation diff --git a/src/animation/frontend/qabstractclipblendnode_p.h b/src/animation/frontend/qabstractclipblendnode_p.h index 3066682a5..fef0e113c 100644 --- a/src/animation/frontend/qabstractclipblendnode_p.h +++ b/src/animation/frontend/qabstractclipblendnode_p.h @@ -63,7 +63,7 @@ public: QAbstractClipBlendNodePrivate(); Q_DECLARE_PUBLIC(QAbstractClipBlendNode) - QVector<QAbstractAnimationClip *> m_clips; + QList<QAbstractAnimationClip *> m_clips; }; } // namespace Qt3DAnimation diff --git a/src/animation/frontend/qanimationaspect.cpp b/src/animation/frontend/qanimationaspect.cpp index ce059f996..351569190 100644 --- a/src/animation/frontend/qanimationaspect.cpp +++ b/src/animation/frontend/qanimationaspect.cpp @@ -95,7 +95,7 @@ QAnimationAspect::QAnimationAspect(QAnimationAspectPrivate &dd, QObject *parent) Q_D(QAnimationAspect); qRegisterMetaType<Qt3DAnimation::QAnimationClipLoader*>(); qRegisterMetaType<Qt3DAnimation::QChannelMapper*>(); - qRegisterMetaType<QVector<Qt3DCore::Sqt>>(); + qRegisterMetaType<QList<Qt3DCore::Sqt>>(); qRegisterMetaType<Qt3DAnimation::QAbstractAnimationClip*>(); registerBackendType<QAbstractAnimationClip>( diff --git a/src/animation/frontend/qanimationclipdata.cpp b/src/animation/frontend/qanimationclipdata.cpp index 1e02332de..8131d194f 100644 --- a/src/animation/frontend/qanimationclipdata.cpp +++ b/src/animation/frontend/qanimationclipdata.cpp @@ -48,7 +48,7 @@ namespace Qt3DAnimation { class QAnimationClipDataPrivate { public: - QVector<QChannel> m_channels; + QList<QChannel> m_channels; QString m_name; }; diff --git a/src/animation/frontend/qanimationcontroller_p.h b/src/animation/frontend/qanimationcontroller_p.h index c06484911..22d7f9a67 100644 --- a/src/animation/frontend/qanimationcontroller_p.h +++ b/src/animation/frontend/qanimationcontroller_p.h @@ -62,7 +62,7 @@ public: QString m_name; int m_activeAnimationGroup; - QVector<QAnimationGroup *> m_animationGroups; + QList<QAnimationGroup *> m_animationGroups; float m_position; float m_scaledPosition; float m_positionScale; diff --git a/src/animation/frontend/qanimationgroup_p.h b/src/animation/frontend/qanimationgroup_p.h index 1e13952aa..d0a2e16f4 100644 --- a/src/animation/frontend/qanimationgroup_p.h +++ b/src/animation/frontend/qanimationgroup_p.h @@ -61,7 +61,7 @@ public: QAnimationGroupPrivate(); QString m_name; - QVector<Qt3DAnimation::QAbstractAnimation *> m_animations; + QList<Qt3DAnimation::QAbstractAnimation *> m_animations; float m_position; float m_duration; diff --git a/src/animation/frontend/qchannel.cpp b/src/animation/frontend/qchannel.cpp index 9e47357e2..3970ea8ab 100644 --- a/src/animation/frontend/qchannel.cpp +++ b/src/animation/frontend/qchannel.cpp @@ -48,7 +48,7 @@ namespace Qt3DAnimation { class QChannelPrivate { public: - QVector<QChannelComponent> m_channelComponents; + QList<QChannelComponent> m_channelComponents; QString m_name; int m_jointIndex = -1; }; diff --git a/src/animation/frontend/qchannelcomponent.cpp b/src/animation/frontend/qchannelcomponent.cpp index 60c0fec88..e26752aa6 100644 --- a/src/animation/frontend/qchannelcomponent.cpp +++ b/src/animation/frontend/qchannelcomponent.cpp @@ -48,7 +48,7 @@ namespace Qt3DAnimation { class QChannelComponentPrivate { public: - QVector<QKeyFrame> m_keyFrames; + QList<QKeyFrame> m_keyFrames; QString m_name; }; diff --git a/src/animation/frontend/qchannelmapper_p.h b/src/animation/frontend/qchannelmapper_p.h index 45f8b0422..a246d4e4b 100644 --- a/src/animation/frontend/qchannelmapper_p.h +++ b/src/animation/frontend/qchannelmapper_p.h @@ -63,12 +63,12 @@ public: Q_DECLARE_PUBLIC(QChannelMapper) - QVector<QAbstractChannelMapping *> m_mappings; + QList<QAbstractChannelMapping *> m_mappings; }; struct QChannelMapperData { - QVector<Qt3DCore::QNodeId> mappingIds; + QList<Qt3DCore::QNodeId> mappingIds; }; } // namespace Qt3DAnimation diff --git a/src/animation/frontend/qchannelmapping.cpp b/src/animation/frontend/qchannelmapping.cpp index bbccb0f16..9c6687031 100644 --- a/src/animation/frontend/qchannelmapping.cpp +++ b/src/animation/frontend/qchannelmapping.cpp @@ -53,7 +53,7 @@ int componentCountForValue(const T &) } template<> -int componentCountForValue<QVector<float>>(const QVector<float> &v) +int componentCountForValue<QList<float>>(const QList<float> &v) { return v.size(); } @@ -67,10 +67,10 @@ int componentCountForValue<QVariantList>(const QVariantList &v) int componentCountForType(int type, const QVariant &value) { - const int vectorOfFloatTypeId = qMetaTypeId<QVector<float>>(); + const int vectorOfFloatTypeId = qMetaTypeId<QList<float>>(); if (type == vectorOfFloatTypeId) - return componentCountForValue<QVector<float>>(value.value<QVector<float>>()); + return componentCountForValue<QList<float>>(value.value<QList<float>>()); switch (type) { case QMetaType::Float: diff --git a/src/animation/frontend/qchannelmapping_p.h b/src/animation/frontend/qchannelmapping_p.h index 0ab66a7f7..eba548552 100644 --- a/src/animation/frontend/qchannelmapping_p.h +++ b/src/animation/frontend/qchannelmapping_p.h @@ -50,7 +50,7 @@ #include <Qt3DAnimation/private/qabstractchannelmapping_p.h> #include <Qt3DAnimation/qanimationcallback.h> -#include <QVector> +#include <QList> QT_BEGIN_NAMESPACE @@ -88,6 +88,6 @@ struct QChannelMappingData QT_END_NAMESPACE // Used to define the meta type id -Q_DECLARE_METATYPE(QVector<float>) // LCOV_EXCL_LINE +Q_DECLARE_METATYPE(QList<float>) // LCOV_EXCL_LINE #endif // QT3DANIMATION_QCHANNELMAPPING_P_H diff --git a/src/animation/frontend/qkeyframeanimation_p.h b/src/animation/frontend/qkeyframeanimation_p.h index b9b1f8585..3f7428d9d 100644 --- a/src/animation/frontend/qkeyframeanimation_p.h +++ b/src/animation/frontend/qkeyframeanimation_p.h @@ -63,8 +63,8 @@ public: void calculateFrame(float position); - QVector<float> m_framePositions; - QVector<Qt3DCore::QTransform *> m_keyframes; + QList<float> m_framePositions; + QList<Qt3DCore::QTransform *> m_keyframes; Qt3DCore::QTransform *m_target; QEasingCurve m_easing; QString m_animationName; diff --git a/src/animation/frontend/qmorphinganimation_p.h b/src/animation/frontend/qmorphinganimation_p.h index c306f3309..5c501ef8d 100644 --- a/src/animation/frontend/qmorphinganimation_p.h +++ b/src/animation/frontend/qmorphinganimation_p.h @@ -69,11 +69,11 @@ public: float m_minposition; float m_maxposition; - QVector<float> m_targetPositions; - QVector<QVector<float>*> m_weights; - QVector<float> m_morphKey; + QList<float> m_targetPositions; + QList<QList<float>*> m_weights; + QList<float> m_morphKey; QStringList m_attributeNames; - QVector<Qt3DAnimation::QMorphTarget *> m_morphTargets; + QList<Qt3DAnimation::QMorphTarget *> m_morphTargets; QMorphTarget *m_flattened; QMorphingAnimation::Method m_method; QEasingCurve m_easing; diff --git a/src/animation/frontend/qmorphtarget_p.h b/src/animation/frontend/qmorphtarget_p.h index 3214043f4..95ba0ed92 100644 --- a/src/animation/frontend/qmorphtarget_p.h +++ b/src/animation/frontend/qmorphtarget_p.h @@ -64,7 +64,7 @@ public: void updateAttributeNames(); QStringList m_attributeNames; - QVector<Qt3DCore::QAttribute *> m_targetAttributes; + QList<Qt3DCore::QAttribute *> m_targetAttributes; Q_DECLARE_PUBLIC(QMorphTarget) }; diff --git a/src/animation/frontend/qvertexblendanimation_p.h b/src/animation/frontend/qvertexblendanimation_p.h index 8f2609fc8..c4846856a 100644 --- a/src/animation/frontend/qvertexblendanimation_p.h +++ b/src/animation/frontend/qvertexblendanimation_p.h @@ -66,8 +66,8 @@ public: void getAttributesInPosition(float position, int *target0, int *target1, float *interpolator); void updateAnimation(float position); - QVector<float> m_targetPositions; - QVector<Qt3DAnimation::QMorphTarget *> m_morphTargets; + QList<float> m_targetPositions; + QList<Qt3DAnimation::QMorphTarget *> m_morphTargets; float m_interpolator; Qt3DRender::QGeometryRenderer *m_target; QString m_targetName; diff --git a/src/core/aspects/aspectcommanddebugger_p.h b/src/core/aspects/aspectcommanddebugger_p.h index b39708ab1..3d26e0441 100644 --- a/src/core/aspects/aspectcommanddebugger_p.h +++ b/src/core/aspects/aspectcommanddebugger_p.h @@ -92,7 +92,7 @@ private: void onCommandReceived(QTcpSocket *socket); void executeCommand(const QString &command, QTcpSocket *socket); - QVector<QTcpSocket *> m_connections; + QList<QTcpSocket *> m_connections; QSystemInformationService *m_service; ReadBuffer m_readBuffer; diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp index 6822c938f..31938696b 100644 --- a/src/core/aspects/qabstractaspect.cpp +++ b/src/core/aspects/qabstractaspect.cpp @@ -207,7 +207,7 @@ QBackendNodeMapperPtr QAbstractAspectPrivate::mapperForNode(const QMetaObject *m return mapper; } -void QAbstractAspectPrivate::syncDirtyFrontEndNodes(const QVector<QNode *> &nodes) +void QAbstractAspectPrivate::syncDirtyFrontEndNodes(const QList<QNode *> &nodes) { for (auto node: qAsConst(nodes)) { const QMetaObject *metaObj = QNodePrivate::get(node)->m_typeInfo; @@ -229,7 +229,7 @@ void QAbstractAspectPrivate::syncDirtyFrontEndNode(QNode *node, QBackendNode *ba backend->syncFromFrontEnd(node, firstTime); } -void QAbstractAspectPrivate::syncDirtyEntityComponentNodes(const QVector<ComponentRelationshipChange> &changes) +void QAbstractAspectPrivate::syncDirtyEntityComponentNodes(const QList<ComponentRelationshipChange> &changes) { auto getBackend = [this] (QNode *node) -> QBackendNode* { const QMetaObject *metaObj = QNodePrivate::get(node)->m_typeInfo; @@ -308,7 +308,7 @@ void QAbstractAspectPrivate::clearBackendNode(const NodeTreeChange &change) cons backendNodeMapper->destroy(change.id); } -void QAbstractAspectPrivate::setRootAndCreateNodes(QEntity *rootObject, const QVector<NodeTreeChange> &nodesChanges) +void QAbstractAspectPrivate::setRootAndCreateNodes(QEntity *rootObject, const QList<NodeTreeChange> &nodesChanges) { qCDebug(Aspects) << Q_FUNC_INFO << "rootObject =" << rootObject; if (rootObject == m_root) diff --git a/src/core/aspects/qabstractaspect_p.h b/src/core/aspects/qabstractaspect_p.h index f5e295ba3..528d66a8a 100644 --- a/src/core/aspects/qabstractaspect_p.h +++ b/src/core/aspects/qabstractaspect_p.h @@ -60,7 +60,7 @@ #include <QtCore/private/qobject_p.h> #include <QMutex> -#include <QVector> +#include <QList> QT_BEGIN_NAMESPACE @@ -119,7 +119,7 @@ public: QAbstractAspectPrivate(); ~QAbstractAspectPrivate(); - void setRootAndCreateNodes(QEntity *rootObject, const QVector<NodeTreeChange> &nodesTreeChanges); + void setRootAndCreateNodes(QEntity *rootObject, const QList<NodeTreeChange> &nodesTreeChanges); QServiceLocator *services() const; QAbstractAspectJobManager *jobManager() const; @@ -130,8 +130,8 @@ public: QBackendNode *createBackendNode(const NodeTreeChange &change) const; void clearBackendNode(const NodeTreeChange &change) const; - void syncDirtyFrontEndNodes(const QVector<QNode *> &nodes); - void syncDirtyEntityComponentNodes(const QVector<ComponentRelationshipChange> &nodes); + void syncDirtyFrontEndNodes(const QList<QNode *> &nodes); + void syncDirtyEntityComponentNodes(const QList<ComponentRelationshipChange> &nodes); virtual void syncDirtyFrontEndNode(QNode *node, QBackendNode *backend, bool firstTime) const; void sendPropertyMessages(QNode *node, QBackendNode *backend) const; diff --git a/src/core/aspects/qaspectengine_p.h b/src/core/aspects/qaspectengine_p.h index 47a756511..e38f7fd30 100644 --- a/src/core/aspects/qaspectengine_p.h +++ b/src/core/aspects/qaspectengine_p.h @@ -79,7 +79,7 @@ public: QAspectManager *m_aspectManager; QScene *m_scene; QSharedPointer<QEntity> m_root; - QVector<QAbstractAspect*> m_aspects; + QList<QAbstractAspect*> m_aspects; QHash<QString, QAbstractAspect *> m_namedAspects; bool m_initialized; QAspectEngine::RunMode m_runMode; diff --git a/src/core/aspects/qaspectmanager.cpp b/src/core/aspects/qaspectmanager.cpp index f4221cfe2..3931fb311 100644 --- a/src/core/aspects/qaspectmanager.cpp +++ b/src/core/aspects/qaspectmanager.cpp @@ -266,7 +266,7 @@ void QAspectManager::shutdown() } // MainThread called by QAspectEngine::setRootEntity -void QAspectManager::setRootEntity(Qt3DCore::QEntity *root, const QVector<QNode *> &nodes) +void QAspectManager::setRootEntity(Qt3DCore::QEntity *root, const QList<QNode *> &nodes) { qCDebug(Aspects) << Q_FUNC_INFO; @@ -282,7 +282,7 @@ void QAspectManager::setRootEntity(Qt3DCore::QEntity *root, const QVector<QNode if (m_root) { - QVector<NodeTreeChange> nodeTreeChanges; + QList<NodeTreeChange> nodeTreeChanges; nodeTreeChanges.reserve(nodes.size()); for (QNode *n : nodes) { @@ -301,14 +301,14 @@ void QAspectManager::setRootEntity(Qt3DCore::QEntity *root, const QVector<QNode // Main Thread -> immediately following node insertion -void QAspectManager::addNodes(const QVector<QNode *> &nodes) +void QAspectManager::addNodes(const QList<QNode *> &nodes) { // We record the nodes added information, which we will actually use when // processFrame is called (later but within the same loop of the even loop // as this call) The idea is we want to avoid modifying the backend tree if // the Renderer hasn't allowed processFrame to continue yet - QVector<NodeTreeChange> treeChanges; + QList<NodeTreeChange> treeChanges; treeChanges.reserve(nodes.size()); for (QNode *node : nodes) { @@ -322,7 +322,7 @@ void QAspectManager::addNodes(const QVector<QNode *> &nodes) } // Main Thread -> immediately following node destruction (call from QNode dtor) -void QAspectManager::removeNodes(const QVector<QNode *> &nodes) +void QAspectManager::removeNodes(const QList<QNode *> &nodes) { // We record the nodes removed information, which we will actually use when // processFrame is called (later but within the same loop of the even loop @@ -391,7 +391,7 @@ void QAspectManager::unregisterAspect(Qt3DCore::QAbstractAspect *aspect) qCDebug(Aspects) << "Completed unregistering aspect"; } -const QVector<QAbstractAspect *> &QAspectManager::aspects() const +const QList<QAbstractAspect *> &QAspectManager::aspects() const { return m_aspects; } @@ -440,13 +440,13 @@ QNode *QAspectManager::lookupNode(QNodeId id) const return d->m_scene ? d->m_scene->lookupNode(id) : nullptr; } -QVector<QNode *> QAspectManager::lookupNodes(const QVector<QNodeId> &ids) const +QList<QNode *> QAspectManager::lookupNodes(const QList<QNodeId> &ids) const { if (!m_root) return {}; QNodePrivate *d = QNodePrivate::get(m_root); - return d->m_scene ? d->m_scene->lookupNodes(ids) : QVector<QNode *>{}; + return d->m_scene ? d->m_scene->lookupNodes(ids) : QList<QNode *>{}; } QScene *QAspectManager::scene() const @@ -528,7 +528,7 @@ void QAspectManager::processFrame() m_postConstructorInit->processNodes(); // Add and Remove Nodes - const QVector<NodeTreeChange> nodeTreeChanges = std::move(m_nodeTreeChanges); + const QList<NodeTreeChange> nodeTreeChanges = std::move(m_nodeTreeChanges); for (const NodeTreeChange &change : nodeTreeChanges) { // Buckets ensure that even if we have intermingled node added / removed // buckets, we preserve the order of the sequences diff --git a/src/core/aspects/qaspectmanager_p.h b/src/core/aspects/qaspectmanager_p.h index d1533787e..ab1d1494c 100644 --- a/src/core/aspects/qaspectmanager_p.h +++ b/src/core/aspects/qaspectmanager_p.h @@ -55,11 +55,11 @@ #include <Qt3DCore/qabstractfrontendnodemanager.h> #include <Qt3DCore/qnode.h> #include <Qt3DCore/qnodeid.h> +#include <QtCore/QList> #include <QtCore/QObject> #include <QtCore/QScopedPointer> #include <QtCore/QSemaphore> #include <QtCore/QVariant> -#include <QtCore/QVector> #include <Qt3DCore/private/qt3dcore_global_p.h> @@ -104,14 +104,14 @@ public Q_SLOTS: void shutdown(); void processFrame(); - void setRootEntity(Qt3DCore::QEntity *root, const QVector<QNode *> &nodes); - void addNodes(const QVector<QNode *> &nodes); - void removeNodes(const QVector<QNode *> &nodes); + void setRootEntity(Qt3DCore::QEntity *root, const QList<QNode *> &nodes); + void addNodes(const QList<QNode *> &nodes); + void removeNodes(const QList<QNode *> &nodes); void registerAspect(Qt3DCore::QAbstractAspect *aspect); void unregisterAspect(Qt3DCore::QAbstractAspect *aspect); public: - const QVector<QAbstractAspect *> &aspects() const; + const QList<QAbstractAspect *> &aspects() const; QAbstractAspect *aspect(const QString &name) const; QAbstractAspect *aspect(const QMetaObject *metaType) const; QAbstractAspectJobManager *jobManager() const; @@ -120,7 +120,7 @@ public: void setPostConstructorInit(NodePostConstructorInit *postConstructorInit); QNode *lookupNode(QNodeId id) const override; - QVector<QNode *> lookupNodes(const QVector<QNodeId> &ids) const override; + QList<QNode *> lookupNodes(const QList<QNodeId> &ids) const override; QScene *scene() const; int jobsInLastFrame() const { return m_jobsInLastFrame; } @@ -133,7 +133,7 @@ private: void requestNextFrame(); QAspectEngine *m_engine; - QVector<QAbstractAspect *> m_aspects; + QList<QAbstractAspect *> m_aspects; QEntity *m_root; QVariantMap m_data; QScheduler *m_scheduler; @@ -142,7 +142,7 @@ private: QScopedPointer<QServiceLocator> m_serviceLocator; bool m_simulationLoopRunning; QAspectEngine::RunMode m_driveMode; - QVector<NodeTreeChange> m_nodeTreeChanges; + QList<NodeTreeChange> m_nodeTreeChanges; NodePostConstructorInit* m_postConstructorInit; #if QT_CONFIG(animation) diff --git a/src/core/geometry/qgeometry_p.h b/src/core/geometry/qgeometry_p.h index ed13b3feb..a30f9f588 100644 --- a/src/core/geometry/qgeometry_p.h +++ b/src/core/geometry/qgeometry_p.h @@ -74,7 +74,7 @@ public: void setExtent(const QVector3D &minExtent, const QVector3D &maxExtent); static QGeometryPrivate *get(QGeometry *q); - QVector<QAttribute *> m_attributes; + QList<QAttribute *> m_attributes; QAttribute *m_boundingVolumePositionAttribute; QVector3D m_minExtent; QVector3D m_maxExtent; diff --git a/src/core/jobs/calcboundingvolumejob.cpp b/src/core/jobs/calcboundingvolumejob.cpp index 0839b18ec..daab9e35a 100644 --- a/src/core/jobs/calcboundingvolumejob.cpp +++ b/src/core/jobs/calcboundingvolumejob.cpp @@ -82,7 +82,7 @@ BoundingVolumeComputeData findBoundingVolumeComputeData(QGeometryView *node) int drawVertexCount = node->vertexCount(); // may be 0, gets changed below if so QAttribute *positionAttribute = dgeom->m_boundingVolumePositionAttribute; - const QVector<Qt3DCore::QAttribute *> attributes = geom->attributes(); + const QList<Qt3DCore::QAttribute *> attributes = geom->attributes(); // Use the default position attribute if attribute is null if (!positionAttribute) { diff --git a/src/core/jobs/qaspectjobmanager.cpp b/src/core/jobs/qaspectjobmanager.cpp index ed8846bb6..e99ba4480 100644 --- a/src/core/jobs/qaspectjobmanager.cpp +++ b/src/core/jobs/qaspectjobmanager.cpp @@ -76,7 +76,7 @@ void QAspectJobManager::enqueueJobs(const std::vector<QAspectJobPtr> &jobQueue) // Convert QJobs to Tasks QHash<QAspectJob *, AspectTaskRunnable *> tasksMap; - QVector<RunnableInterface *> taskList; + QList<RunnableInterface *> taskList; taskList.reserve(jobQueue.size()); for (const QAspectJobPtr &job : jobQueue) { AspectTaskRunnable *task = new AspectTaskRunnable(systemService); @@ -118,7 +118,7 @@ void QAspectJobManager::waitForPerThreadFunction(JobFunction func, void *arg) const int threadCount = m_threadPooler->maxThreadCount(); QAtomicInt atomicCount(threadCount); - QVector<RunnableInterface *> taskList; + QList<RunnableInterface *> taskList; for (int i = 0; i < threadCount; ++i) { SyncTaskRunnable *syncTask = new SyncTaskRunnable(func, arg, &atomicCount); taskList << syncTask; diff --git a/src/core/jobs/qaspectjobmanager_p.h b/src/core/jobs/qaspectjobmanager_p.h index 0205b7e5a..e27c850f3 100644 --- a/src/core/jobs/qaspectjobmanager_p.h +++ b/src/core/jobs/qaspectjobmanager_p.h @@ -52,7 +52,6 @@ // #include <Qt3DCore/qaspectjob.h> -#include <QtCore/QVector> #include <Qt3DCore/private/qabstractaspectjobmanager_p.h> #include <Qt3DCore/private/qt3dcore_global_p.h> diff --git a/src/core/jobs/qaspectjobproviderinterface_p.h b/src/core/jobs/qaspectjobproviderinterface_p.h index 4cc7f2047..9873c785c 100644 --- a/src/core/jobs/qaspectjobproviderinterface_p.h +++ b/src/core/jobs/qaspectjobproviderinterface_p.h @@ -52,7 +52,6 @@ // #include <Qt3DCore/qaspectjob.h> -#include <QtCore/QVector> #include <Qt3DCore/private/qt3dcore_global_p.h> diff --git a/src/core/jobs/qthreadpooler.cpp b/src/core/jobs/qthreadpooler.cpp index 59c905f71..b4c7a2b05 100644 --- a/src/core/jobs/qthreadpooler.cpp +++ b/src/core/jobs/qthreadpooler.cpp @@ -64,13 +64,13 @@ QThreadPooler::~QThreadPooler() locker.unlock(); } -void QThreadPooler::enqueueTasks(const QVector<RunnableInterface *> &tasks) +void QThreadPooler::enqueueTasks(const QList<RunnableInterface *> &tasks) { // The caller have to set the mutex - const QVector<RunnableInterface *>::const_iterator end = tasks.cend(); + const QList<RunnableInterface *>::const_iterator end = tasks.cend(); m_totalRunJobs = 0; - for (QVector<RunnableInterface *>::const_iterator it = tasks.cbegin(); + for (QList<RunnableInterface *>::const_iterator it = tasks.cbegin(); it != end; ++it) { // Only AspectTaskRunnables are checked for dependencies. @@ -147,7 +147,7 @@ void QThreadPooler::taskFinished(RunnableInterface *task) } } -QFuture<void> QThreadPooler::mapDependables(QVector<RunnableInterface *> &taskQueue) +QFuture<void> QThreadPooler::mapDependables(QList<RunnableInterface *> &taskQueue) { const QMutexLocker locker(&m_mutex); diff --git a/src/core/jobs/qthreadpooler_p.h b/src/core/jobs/qthreadpooler_p.h index ea69b5b78..058da2fc9 100644 --- a/src/core/jobs/qthreadpooler_p.h +++ b/src/core/jobs/qthreadpooler_p.h @@ -72,7 +72,7 @@ public: explicit QThreadPooler(QObject *parent = nullptr); ~QThreadPooler(); - QFuture<void> mapDependables(QVector<RunnableInterface *> &taskQueue); + QFuture<void> mapDependables(QList<RunnableInterface *> &taskQueue); int waitForAllJobs(); void taskFinished(RunnableInterface *task); QFuture<void> future(); @@ -80,7 +80,7 @@ public: static int maxThreadCount(); private: - void enqueueTasks(const QVector<RunnableInterface *> &tasks); + void enqueueTasks(const QList<RunnableInterface *> &tasks); void skipTask(RunnableInterface *task); void enqueueDepencies(RunnableInterface *task); void acquire(int add); diff --git a/src/core/jobs/task_p.h b/src/core/jobs/task_p.h index cd5d9c1a8..ce83a8009 100644 --- a/src/core/jobs/task_p.h +++ b/src/core/jobs/task_p.h @@ -112,7 +112,7 @@ public: public: QSharedPointer<QAspectJob> m_job; - QVector<AspectTaskRunnable *> m_dependers; + QList<AspectTaskRunnable *> m_dependers; int m_dependerCount = 0; private: diff --git a/src/core/nodes/propertychangehandler_p.h b/src/core/nodes/propertychangehandler_p.h index 6a3911dbd..8b7e73cd8 100644 --- a/src/core/nodes/propertychangehandler_p.h +++ b/src/core/nodes/propertychangehandler_p.h @@ -56,7 +56,6 @@ #include <QtCore/QHash> #include <QtCore/QMetaMethod> #include <QtCore/QObject> -#include <QtCore/QVector> QT_BEGIN_NAMESPACE diff --git a/src/core/nodes/qabstractnodefactory.cpp b/src/core/nodes/qabstractnodefactory.cpp index dbdfc641b..769a9beb0 100644 --- a/src/core/nodes/qabstractnodefactory.cpp +++ b/src/core/nodes/qabstractnodefactory.cpp @@ -60,7 +60,7 @@ QAbstractNodeFactory::~QAbstractNodeFactory() { } -QVector<QAbstractNodeFactory *> node_factories; +QList<QAbstractNodeFactory *> node_factories; /* * Registers the given \a factory @@ -73,7 +73,7 @@ void QAbstractNodeFactory::registerNodeFactory(QAbstractNodeFactory *factory) /* * \return the node factories. */ -QVector<QAbstractNodeFactory *> QAbstractNodeFactory::nodeFactories() +QList<QAbstractNodeFactory *> QAbstractNodeFactory::nodeFactories() { return node_factories; } diff --git a/src/core/nodes/qabstractnodefactory_p.h b/src/core/nodes/qabstractnodefactory_p.h index de1b758a9..9dcc0a500 100644 --- a/src/core/nodes/qabstractnodefactory_p.h +++ b/src/core/nodes/qabstractnodefactory_p.h @@ -67,7 +67,7 @@ public: virtual QNode *createNode(const char *type) = 0; static void registerNodeFactory(QAbstractNodeFactory *factory); - static QVector<QAbstractNodeFactory *> nodeFactories(); + static QList<QAbstractNodeFactory *> nodeFactories(); template<class T> static T *createNode(const char *type) { diff --git a/src/core/nodes/qcomponent_p.h b/src/core/nodes/qcomponent_p.h index d28433d23..a3b7c88e6 100644 --- a/src/core/nodes/qcomponent_p.h +++ b/src/core/nodes/qcomponent_p.h @@ -70,7 +70,7 @@ public: Q_DECLARE_PUBLIC(QComponent) bool m_shareable; - QVector<QEntity *> m_entities; + QList<QEntity *> m_entities; }; } diff --git a/src/core/nodes/qdestructionidandtypecollector_p.h b/src/core/nodes/qdestructionidandtypecollector_p.h index 8557c27f0..ac09bc0a0 100644 --- a/src/core/nodes/qdestructionidandtypecollector_p.h +++ b/src/core/nodes/qdestructionidandtypecollector_p.h @@ -60,7 +60,7 @@ class QDestructionIdAndTypeCollector public: QDestructionIdAndTypeCollector(QNode *rootNode); - QVector<QNodeIdTypePair> subtreeIdsAndTypes() const { return m_subtreeIdsAndTypes; } + QList<QNodeIdTypePair> subtreeIdsAndTypes() const { return m_subtreeIdsAndTypes; } private: void collectIdAndType(QNode *node) @@ -73,7 +73,7 @@ private: QNodePrivate::get(node)->m_hasBackendNode = false; } - QVector<QNodeIdTypePair> m_subtreeIdsAndTypes; + QList<QNodeIdTypePair> m_subtreeIdsAndTypes; }; } // namespace Qt3DCore diff --git a/src/core/nodes/qentity_p.h b/src/core/nodes/qentity_p.h index a899fb154..32fd36fa7 100644 --- a/src/core/nodes/qentity_p.h +++ b/src/core/nodes/qentity_p.h @@ -74,9 +74,9 @@ public : void updateComponentRelationShip(QComponent *component, ComponentRelationshipChange::RelationShip change); template<class T> - QVector<T*> componentsOfType() const + QList<T*> componentsOfType() const { - QVector<T*> typedComponents; + QList<T*> typedComponents; for (QComponent *comp : m_components) { T *typedComponent = qobject_cast<T*>(comp); if (typedComponent != nullptr) diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h index 2e84f042d..67d52cec7 100644 --- a/src/core/nodes/qnode_p.h +++ b/src/core/nodes/qnode_p.h @@ -125,7 +125,7 @@ public: } template<typename Caller, typename NodeType> - void registerDestructionHelper(NodeType *node, DestructionFunctionPointer<Caller, NodeType> func, QVector<NodeType*> &) + void registerDestructionHelper(NodeType *node, DestructionFunctionPointer<Caller, NodeType> func, QList<NodeType*> &) { // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); @@ -190,7 +190,7 @@ private: friend class PropertyChangeHandler<QNodePrivate>; bool m_propertyChangesSetup; PropertyChangeHandler<QNodePrivate> m_signals; - QVector<QPair<QNode *, QMetaObject::Connection>> m_destructionConnections; + QList<QPair<QNode *, QMetaObject::Connection>> m_destructionConnections; }; class NodePostConstructorInit : public QObject diff --git a/src/core/qchangearbiter.cpp b/src/core/qchangearbiter.cpp index 678178a44..74b2490bf 100644 --- a/src/core/qchangearbiter.cpp +++ b/src/core/qchangearbiter.cpp @@ -99,12 +99,12 @@ void QChangeArbiter::removeDirtyFrontEndNode(QNode *node) }), m_dirtyEntityComponentNodeChanges.end()); } -QVector<QNode *> QChangeArbiter::takeDirtyFrontEndNodes() +QList<QNode *> QChangeArbiter::takeDirtyFrontEndNodes() { return std::move(m_dirtyFrontEndNodes); } -QVector<ComponentRelationshipChange> QChangeArbiter::takeDirtyEntityComponentNodes() +QList<ComponentRelationshipChange> QChangeArbiter::takeDirtyEntityComponentNodes() { return std::move(m_dirtyEntityComponentNodeChanges); } diff --git a/src/core/qchangearbiter_p.h b/src/core/qchangearbiter_p.h index 91c232d2a..ebc0304af 100644 --- a/src/core/qchangearbiter_p.h +++ b/src/core/qchangearbiter_p.h @@ -53,13 +53,13 @@ #include <Qt3DCore/qnodeid.h> #include <QtCore/QFlags> +#include <QtCore/QList> #include <QtCore/QMutex> #include <QtCore/QObject> #include <QtCore/QPair> #include <QtCore/QReadWriteLock> #include <QtCore/QThreadStorage> #include <QtCore/QVariant> -#include <QtCore/QVector> #include <Qt3DCore/private/qt3dcore_global_p.h> @@ -101,8 +101,8 @@ public: ComponentRelationshipChange::RelationShip change); void removeDirtyFrontEndNode(QNode *node); - QVector<QNode *> takeDirtyFrontEndNodes(); - QVector<ComponentRelationshipChange> takeDirtyEntityComponentNodes(); + QList<QNode *> takeDirtyFrontEndNodes(); + QList<ComponentRelationshipChange> takeDirtyEntityComponentNodes(); void setScene(Qt3DCore::QScene *scene); @@ -113,8 +113,8 @@ Q_SIGNALS: protected: QScene *m_scene; - QVector<QNode *> m_dirtyFrontEndNodes; - QVector<ComponentRelationshipChange> m_dirtyEntityComponentNodeChanges; + QList<QNode *> m_dirtyFrontEndNodes; + QList<ComponentRelationshipChange> m_dirtyEntityComponentNodeChanges; }; } // namespace Qt3DCore diff --git a/src/core/qscene.cpp b/src/core/qscene.cpp index 20b818917..475f63214 100644 --- a/src/core/qscene.cpp +++ b/src/core/qscene.cpp @@ -119,11 +119,11 @@ QNode *QScene::lookupNode(QNodeId id) const return d->m_nodeLookupTable.value(id); } -QVector<QNode *> QScene::lookupNodes(const QVector<QNodeId> &ids) const +QList<QNode *> QScene::lookupNodes(const QList<QNodeId> &ids) const { Q_D(const QScene); QReadLocker lock(&d->m_lock); - QVector<QNode *> nodes(ids.size()); + QList<QNode *> nodes(ids.size()); int index = 0; for (QNodeId id : ids) nodes[index++] = d->m_nodeLookupTable.value(id); @@ -148,11 +148,11 @@ QChangeArbiter *QScene::arbiter() const return d->m_arbiter; } -QVector<QNodeId> QScene::entitiesForComponent(QNodeId id) const +QList<QNodeId> QScene::entitiesForComponent(QNodeId id) const { Q_D(const QScene); QReadLocker lock(&d->m_lock); - QVector<QNodeId> result; + QList<QNodeId> result; const auto p = d->m_componentToEntities.equal_range(id); for (auto it = p.first; it != p.second; ++it) result.push_back(*it); diff --git a/src/core/qscene_p.h b/src/core/qscene_p.h index ed014a916..f31fc42e1 100644 --- a/src/core/qscene_p.h +++ b/src/core/qscene_p.h @@ -89,7 +89,7 @@ public: void removeObservable(QNode *observable); QNode *lookupNode(QNodeId id) const override; - QVector<QNode *> lookupNodes(const QVector<QNodeId> &ids) const override; + QList<QNode *> lookupNodes(const QList<QNodeId> &ids) const override; QNode *rootNode() const; @@ -97,7 +97,7 @@ public: QChangeArbiter *arbiter() const; // Component -> Entities - QVector<QNodeId> entitiesForComponent(QNodeId id) const; + QList<QNodeId> entitiesForComponent(QNodeId id) const; void addEntityForComponent(QNodeId componentUuid, QNodeId entityUuid); void removeEntityForComponent(QNodeId componentUuid, QNodeId entityUuid); bool hasEntityForComponent(QNodeId componentUuid, QNodeId entityUuid); diff --git a/src/core/qscheduler.cpp b/src/core/qscheduler.cpp index 543e9f2ef..b9d3b75aa 100644 --- a/src/core/qscheduler.cpp +++ b/src/core/qscheduler.cpp @@ -120,7 +120,7 @@ int QScheduler::scheduleAndWaitForFrameAspectJobs(qint64 time, bool dumpJobs) // TODO: Set up dependencies between jobs as needed // For now just queue them up as they are - const QVector<QAbstractAspect *> &aspects = m_aspectManager->aspects(); + const QList<QAbstractAspect *> &aspects = m_aspectManager->aspects(); for (QAbstractAspect *aspect : aspects) { const std::vector<QAspectJobPtr> aspectJobs = QAbstractAspectPrivate::get(aspect)->jobsToExecute(time); jobQueue.insert(jobQueue.end(), diff --git a/src/core/resources/qframeallocator_p.h b/src/core/resources/qframeallocator_p.h index 4c2b5a961..e8bc2e79b 100644 --- a/src/core/resources/qframeallocator_p.h +++ b/src/core/resources/qframeallocator_p.h @@ -58,7 +58,6 @@ #include <QtCore/QDebug> #include <QtCore/QScopedPointer> -#include <QtCore/QVector> #include <Qt3DCore/private/qt3dcore_global_p.h> diff --git a/src/core/resources/qframeallocator_p_p.h b/src/core/resources/qframeallocator_p_p.h index bf4e0a2b1..daf204f22 100644 --- a/src/core/resources/qframeallocator_p_p.h +++ b/src/core/resources/qframeallocator_p_p.h @@ -101,7 +101,7 @@ private: private: uint m_blockSize; uchar m_nbrBlock; - QVector<QFrameChunk> m_chunks; + QList<QFrameChunk> m_chunks; QFrameChunk *m_lastAllocatedChunck; QFrameChunk *m_lastFreedChunck; }; @@ -128,7 +128,7 @@ public: uint m_maxObjectSize; uint m_alignment; - QVector<QFixedFrameAllocator> m_allocatorPool; + QList<QFixedFrameAllocator> m_allocatorPool; }; } // Qt3D diff --git a/src/core/services/qdownloadnetworkworker_p.h b/src/core/services/qdownloadnetworkworker_p.h index faecbca2f..7a425db2d 100644 --- a/src/core/services/qdownloadnetworkworker_p.h +++ b/src/core/services/qdownloadnetworkworker_p.h @@ -90,7 +90,7 @@ private Q_SLOTS: private: QNetworkAccessManager *m_networkManager; - QVector< QPair<QDownloadRequestPtr, QNetworkReply *> > m_requests; + QList< QPair<QDownloadRequestPtr, QNetworkReply *> > m_requests; QMutex m_mutex; }; diff --git a/src/core/services/qsysteminformationservice.cpp b/src/core/services/qsysteminformationservice.cpp index 87cc08e59..02571482f 100644 --- a/src/core/services/qsysteminformationservice.cpp +++ b/src/core/services/qsysteminformationservice.cpp @@ -118,7 +118,7 @@ void QSystemInformationServicePrivate::addJobLogStatsEntry(QSystemInformationSer return; if (!m_jobStatsCached.hasLocalData()) { - auto jobVector = new QVector<JobRunStats>; + auto jobVector = new QList<JobRunStats>; m_jobStatsCached.setLocalData(jobVector); QMutexLocker lock(&m_localStoragesMutex); m_localStorages.push_back(jobVector); @@ -134,13 +134,13 @@ void QSystemInformationServicePrivate::addSubmissionLogStatsEntry(QSystemInforma QMutexLocker lock(&m_localStoragesMutex); if (!m_jobStatsCached.hasLocalData()) { - m_submissionStorage = new QVector<JobRunStats>; + m_submissionStorage = new QList<JobRunStats>; m_jobStatsCached.setLocalData(m_submissionStorage); } // Handle the case where submission thread is also the main thread (Scene/Manual drive modes with no RenderThread) if (m_submissionStorage == nullptr && m_jobStatsCached.hasLocalData()) - m_submissionStorage = new QVector<JobRunStats>; + m_submissionStorage = new QList<JobRunStats>; // When having no submission thread this can be null m_submissionStorage->push_back(stats); @@ -174,12 +174,12 @@ void QSystemInformationServicePrivate::writeFrameJobLogStats() header.frameId = m_frameId; header.jobCount = 0; - for (const QVector<JobRunStats> *storage : qAsConst(m_localStorages)) + for (const QList<JobRunStats> *storage : qAsConst(m_localStorages)) header.jobCount += storage->size(); m_traceFile->write(reinterpret_cast<char *>(&header), sizeof(FrameHeader)); - for (QVector<JobRunStats> *storage : qAsConst(m_localStorages)) { + for (QList<JobRunStats> *storage : qAsConst(m_localStorages)) { for (const JobRunStats &stat : *storage) m_traceFile->write(reinterpret_cast<const char *>(&stat), sizeof(JobRunStats)); storage->clear(); diff --git a/src/core/services/qsysteminformationservice_p_p.h b/src/core/services/qsysteminformationservice_p_p.h index 062a693d5..3ea52b20f 100644 --- a/src/core/services/qsysteminformationservice_p_p.h +++ b/src/core/services/qsysteminformationservice_p_p.h @@ -111,10 +111,10 @@ public: bool m_graphicsTraceEnabled; QElapsedTimer m_jobsStatTimer; - QThreadStorage<QVector<JobRunStats> *> m_jobStatsCached; + QThreadStorage<QList<JobRunStats> *> m_jobStatsCached; - QVector<QVector<JobRunStats> *> m_localStorages; - QVector<JobRunStats> *m_submissionStorage; + QList<QList<JobRunStats> *> m_localStorages; + QList<JobRunStats> *m_submissionStorage; QMutex m_localStoragesMutex; diff --git a/src/core/transforms/qabstractskeleton_p.h b/src/core/transforms/qabstractskeleton_p.h index 333fa5fdf..01d8fc74e 100644 --- a/src/core/transforms/qabstractskeleton_p.h +++ b/src/core/transforms/qabstractskeleton_p.h @@ -78,8 +78,8 @@ public: SkeletonType m_type; int m_jointCount; - QVector<Sqt> m_localPoses; - QVector<QString> m_jointNames; + QList<Sqt> m_localPoses; + QList<QString> m_jointNames; }; } // namespace Qt3DCore diff --git a/src/core/transforms/qjoint_p.h b/src/core/transforms/qjoint_p.h index cb0bfe847..60faac726 100644 --- a/src/core/transforms/qjoint_p.h +++ b/src/core/transforms/qjoint_p.h @@ -68,7 +68,7 @@ public: Q_DECLARE_PUBLIC(QJoint) QMatrix4x4 m_inverseBindMatrix; - QVector<QJoint *> m_childJoints; + QList<QJoint *> m_childJoints; QQuaternion m_rotation; QVector3D m_translation; QVector3D m_scale; diff --git a/src/core/transforms/sqt_p.h b/src/core/transforms/sqt_p.h index e602cc71e..a3aadd01d 100644 --- a/src/core/transforms/sqt_p.h +++ b/src/core/transforms/sqt_p.h @@ -54,7 +54,7 @@ #include <QtGui/qmatrix4x4.h> #include <QtGui/qquaternion.h> #include <QtGui/qvector3d.h> -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE @@ -95,15 +95,15 @@ struct Sqt struct JointNamesAndLocalPoses { - QVector<QString> names; - QVector<Sqt> localPoses; + QList<QString> names; + QList<Sqt> localPoses; }; } // namespace Qt3DCore QT_END_NAMESPACE -Q_DECLARE_METATYPE(QVector<Qt3DCore::Sqt>) +Q_DECLARE_METATYPE(QList<Qt3DCore::Sqt>) Q_DECLARE_METATYPE(Qt3DCore::JointNamesAndLocalPoses) #endif // QT3DCORE_SQT_P_H diff --git a/src/doc/snippets/code/src_core_qcircularbuffer.cpp b/src/doc/snippets/code/src_core_qcircularbuffer.cpp index 3a41adfba..ae373b92f 100644 --- a/src/doc/snippets/code/src_core_qcircularbuffer.cpp +++ b/src/doc/snippets/code/src_core_qcircularbuffer.cpp @@ -159,10 +159,10 @@ circ.insert(2, 5, 0); //! [13] -QVector<double> vector; -vector << 2.718 << 1.442 << 0.4342; -vector.insert(1, 3, 9.9); -// vector: [2.718, 9.9, 9.9, 9.9, 1.442, 0.4342] +QList<double> list; +list << 2.718 << 1.442 << 0.4342; +list.insert(1, 3, 9.9); +// list: [2.718, 9.9, 9.9, 9.9, 1.442, 0.4342] //! [13] diff --git a/src/extras/3dtext/qextrudedtextgeometry.cpp b/src/extras/3dtext/qextrudedtextgeometry.cpp index 3c884f152..e14442ebb 100644 --- a/src/extras/3dtext/qextrudedtextgeometry.cpp +++ b/src/extras/3dtext/qextrudedtextgeometry.cpp @@ -75,10 +75,10 @@ struct TriangulationData { int end; }; - QVector<QVector3D> vertices; - QVector<IndexType> indices; - QVector<Outline> outlines; - QVector<IndexType> outlineIndices; + QList<QVector3D> vertices; + QList<IndexType> indices; + QList<Outline> outlines; + QList<IndexType> outlineIndices; bool inverted; }; @@ -107,7 +107,7 @@ TriangulationData triangulate(const QString &text, const QFont &font) // Extract polylines out of the path, this allows us to retrieve indices for each glyph outline QPolylineSet polylines = qPolyline(path); - QVector<IndexType> tmpIndices; + QList<IndexType> tmpIndices; tmpIndices.resize(polylines.indices.size()); memcpy(tmpIndices.data(), polylines.indices.data(), polylines.indices.size() * sizeof(IndexType)); @@ -307,8 +307,8 @@ void QExtrudedTextGeometryPrivate::update() QVector3D normal; }; - QVector<IndexType> indices; - QVector<Vertex> vertices; + QList<IndexType> indices; + QList<Vertex> vertices; // TODO: keep 'vertices.size()' small when extruding vertices.reserve(data.vertices.size() * 2); diff --git a/src/extras/defaults/qabstractcameracontroller.cpp b/src/extras/defaults/qabstractcameracontroller.cpp index c8ebf42f3..4353b2fa8 100644 --- a/src/extras/defaults/qabstractcameracontroller.cpp +++ b/src/extras/defaults/qabstractcameracontroller.cpp @@ -100,32 +100,32 @@ void QAbstractCameraControllerPrivate::init() //// Actions // Left Mouse Button Action - m_leftMouseButtonInput->setButtons(QVector<int>() << Qt::LeftButton); + m_leftMouseButtonInput->setButtons(QList<int> { Qt::LeftButton }); m_leftMouseButtonInput->setSourceDevice(m_mouseDevice); m_leftMouseButtonAction->addInput(m_leftMouseButtonInput); // Middle Mouse Button Action - m_middleMouseButtonInput->setButtons(QVector<int>() << Qt::MiddleButton); + m_middleMouseButtonInput->setButtons(QList<int> { Qt::MiddleButton }); m_middleMouseButtonInput->setSourceDevice(m_mouseDevice); m_middleMouseButtonAction->addInput(m_middleMouseButtonInput); // Right Mouse Button Action - m_rightMouseButtonInput->setButtons(QVector<int>() << Qt::RightButton); + m_rightMouseButtonInput->setButtons(QList<int> { Qt::RightButton }); m_rightMouseButtonInput->setSourceDevice(m_mouseDevice); m_rightMouseButtonAction->addInput(m_rightMouseButtonInput); // Alt Button Action - m_altButtonInput->setButtons(QVector<int>() << Qt::Key_Alt); + m_altButtonInput->setButtons(QList<int> { Qt::Key_Alt }); m_altButtonInput->setSourceDevice(m_keyboardDevice); m_altButtonAction->addInput(m_altButtonInput); // Shift Button Action - m_shiftButtonInput->setButtons(QVector<int>() << Qt::Key_Shift); + m_shiftButtonInput->setButtons(QList<int> { Qt::Key_Shift }); m_shiftButtonInput->setSourceDevice(m_keyboardDevice); m_shiftButtonAction->addInput(m_shiftButtonInput); // Escape Button Action - m_escapeButtonInput->setButtons(QVector<int>() << Qt::Key_Escape); + m_escapeButtonInput->setButtons(QList<int> { Qt::Key_Escape }); m_escapeButtonInput->setSourceDevice(m_keyboardDevice); m_escapeButtonAction->addInput(m_escapeButtonInput); @@ -152,37 +152,37 @@ void QAbstractCameraControllerPrivate::init() m_tzAxis->addInput(m_mouseTzYInput); // Keyboard Pos Tx - m_keyboardTxPosInput->setButtons(QVector<int>() << Qt::Key_Right); + m_keyboardTxPosInput->setButtons(QList<int> { Qt::Key_Right }); m_keyboardTxPosInput->setScale(1.0f); m_keyboardTxPosInput->setSourceDevice(m_keyboardDevice); m_txAxis->addInput(m_keyboardTxPosInput); // Keyboard Pos Tz - m_keyboardTzPosInput->setButtons(QVector<int>() << Qt::Key_PageUp); + m_keyboardTzPosInput->setButtons(QList<int> { Qt::Key_PageUp }); m_keyboardTzPosInput->setScale(1.0f); m_keyboardTzPosInput->setSourceDevice(m_keyboardDevice); m_tzAxis->addInput(m_keyboardTzPosInput); // Keyboard Pos Ty - m_keyboardTyPosInput->setButtons(QVector<int>() << Qt::Key_Up); + m_keyboardTyPosInput->setButtons(QList<int> { Qt::Key_Up }); m_keyboardTyPosInput->setScale(1.0f); m_keyboardTyPosInput->setSourceDevice(m_keyboardDevice); m_tyAxis->addInput(m_keyboardTyPosInput); // Keyboard Neg Tx - m_keyboardTxNegInput->setButtons(QVector<int>() << Qt::Key_Left); + m_keyboardTxNegInput->setButtons(QList<int> { Qt::Key_Left }); m_keyboardTxNegInput->setScale(-1.0f); m_keyboardTxNegInput->setSourceDevice(m_keyboardDevice); m_txAxis->addInput(m_keyboardTxNegInput); // Keyboard Neg Tz - m_keyboardTzNegInput->setButtons(QVector<int>() << Qt::Key_PageDown); + m_keyboardTzNegInput->setButtons(QList<int> { Qt::Key_PageDown }); m_keyboardTzNegInput->setScale(-1.0f); m_keyboardTzNegInput->setSourceDevice(m_keyboardDevice); m_tzAxis->addInput(m_keyboardTzNegInput); // Keyboard Neg Ty - m_keyboardTyNegInput->setButtons(QVector<int>() << Qt::Key_Down); + m_keyboardTyNegInput->setButtons(QList<int> { Qt::Key_Down }); m_keyboardTyNegInput->setScale(-1.0f); m_keyboardTyNegInput->setSourceDevice(m_keyboardDevice); m_tyAxis->addInput(m_keyboardTyNegInput); diff --git a/src/extras/defaults/qspritesheet_p.h b/src/extras/defaults/qspritesheet_p.h index 5091800fe..c6b46eac7 100644 --- a/src/extras/defaults/qspritesheet_p.h +++ b/src/extras/defaults/qspritesheet_p.h @@ -39,8 +39,7 @@ #ifndef QT3DEXTRAS_QSPRITESHEET_P_H #define QT3DEXTRAS_QSPRITESHEET_P_H -#include <QRect> -#include <QVector> +#include <QList> // // W A R N I N G @@ -70,7 +69,7 @@ class QSpriteSheetPrivate : public QAbstractSpriteSheetPrivate void updateSizes() override; void updateTransform() override; - QVector<QSpriteSheetItem *> m_sprites; + QList<QSpriteSheetItem *> m_sprites; Q_DECLARE_PUBLIC(QSpriteSheet) }; diff --git a/src/extras/defaults/qspritesheetitem_p.h b/src/extras/defaults/qspritesheetitem_p.h index f23d71cd7..a74b7e704 100644 --- a/src/extras/defaults/qspritesheetitem_p.h +++ b/src/extras/defaults/qspritesheetitem_p.h @@ -39,8 +39,6 @@ #ifndef QT3DEXTRAS_QSPRITESHEET_P_H #define QT3DEXTRAS_QSPRITESHEET_P_H -#include <QRect> -#include <QVector> // // W A R N I N G diff --git a/src/extras/text/distancefieldtextrenderer.cpp b/src/extras/text/distancefieldtextrenderer.cpp index af4840a36..6fcb867db 100644 --- a/src/extras/text/distancefieldtextrenderer.cpp +++ b/src/extras/text/distancefieldtextrenderer.cpp @@ -129,8 +129,8 @@ DistanceFieldTextRenderer::~DistanceFieldTextRenderer() } void DistanceFieldTextRenderer::setGlyphData(Qt3DRender::QAbstractTexture *glyphTexture, - const QVector<float> &vertexData, - const QVector<quint16> &indexData) + const QList<float> &vertexData, + const QList<quint16> &indexData) { Q_D(DistanceFieldTextRenderer); diff --git a/src/extras/text/distancefieldtextrenderer_p.h b/src/extras/text/distancefieldtextrenderer_p.h index fdb9a836f..0d71abc3b 100644 --- a/src/extras/text/distancefieldtextrenderer_p.h +++ b/src/extras/text/distancefieldtextrenderer_p.h @@ -75,8 +75,8 @@ public: ~DistanceFieldTextRenderer(); void setGlyphData(Qt3DRender::QAbstractTexture *glyphTexture, - const QVector<float> &vertexData, - const QVector<quint16> &indexData); + const QList<float> &vertexData, + const QList<quint16> &indexData); void setColor(const QColor &color); diff --git a/src/extras/text/qdistancefieldglyphcache.cpp b/src/extras/text/qdistancefieldglyphcache.cpp index 63621848c..f1c2bd3e0 100644 --- a/src/extras/text/qdistancefieldglyphcache.cpp +++ b/src/extras/text/qdistancefieldglyphcache.cpp @@ -108,7 +108,7 @@ private: QHash<quint32, StoredGlyph> m_glyphs; - QVector<QTextureAtlas*> m_atlasses; + QList<QTextureAtlas*> m_atlasses; }; StoredGlyph::StoredGlyph(const QRawFont &font, quint32 glyph, bool doubleResolution) @@ -336,12 +336,12 @@ QDistanceFieldGlyphCache::Glyph refAndGetGlyph(DistanceFieldFont *dff, quint32 g } } // anonymous -QVector<QDistanceFieldGlyphCache::Glyph> QDistanceFieldGlyphCache::refGlyphs(const QGlyphRun &run) +QList<QDistanceFieldGlyphCache::Glyph> QDistanceFieldGlyphCache::refGlyphs(const QGlyphRun &run) { DistanceFieldFont *dff = getOrCreateDistanceFieldFont(run.rawFont()); - QVector<QDistanceFieldGlyphCache::Glyph> ret; + QList<QDistanceFieldGlyphCache::Glyph> ret; - const QVector<quint32> glyphs = run.glyphIndexes(); + const QList<quint32> glyphs = run.glyphIndexes(); for (quint32 glyph : glyphs) ret << refAndGetGlyph(dff, glyph); @@ -357,7 +357,7 @@ void QDistanceFieldGlyphCache::derefGlyphs(const QGlyphRun &run) { DistanceFieldFont *dff = getOrCreateDistanceFieldFont(run.rawFont()); - const QVector<quint32> glyphs = run.glyphIndexes(); + const QList<quint32> glyphs = run.glyphIndexes(); for (quint32 glyph : glyphs) dff->derefGlyph(glyph); } diff --git a/src/extras/text/qdistancefieldglyphcache_p.h b/src/extras/text/qdistancefieldglyphcache_p.h index 6ca011c76..1cd58d55b 100644 --- a/src/extras/text/qdistancefieldglyphcache_p.h +++ b/src/extras/text/qdistancefieldglyphcache_p.h @@ -90,7 +90,7 @@ public: bool doubleGlyphResolution(const QRawFont &font); - QVector<Glyph> refGlyphs(const QGlyphRun &run); + QList<Glyph> refGlyphs(const QGlyphRun &run); Glyph refGlyph(const QRawFont &font, quint32 glyph); void derefGlyphs(const QGlyphRun &run); diff --git a/src/extras/text/qtext2dentity.cpp b/src/extras/text/qtext2dentity.cpp index ecd8be440..30f928aa9 100644 --- a/src/extras/text/qtext2dentity.cpp +++ b/src/extras/text/qtext2dentity.cpp @@ -211,11 +211,11 @@ float QText2DEntityPrivate::computeActualScale() const struct RenderData { int vertexCount = 0; - QVector<float> vertex; - QVector<quint16> index; + QList<float> vertex; + QList<quint16> index; }; -void QText2DEntityPrivate::setCurrentGlyphRuns(const QVector<QGlyphRun> &runs) +void QText2DEntityPrivate::setCurrentGlyphRuns(const QList<QGlyphRun> &runs) { // For each distinct texture, we need a separate DistanceFieldTextRenderer, // for which we need vertex and index data @@ -224,8 +224,8 @@ void QText2DEntityPrivate::setCurrentGlyphRuns(const QVector<QGlyphRun> &runs) // process glyph runs for (const QGlyphRun &run : runs) { - const QVector<quint32> glyphs = run.glyphIndexes(); - const QVector<QPointF> pos = run.positions(); + const QList<quint32> glyphs = run.glyphIndexes(); + const QList<QPointF> pos = run.positions(); Q_ASSERT(glyphs.size() == pos.size()); @@ -330,7 +330,7 @@ void QText2DEntityPrivate::updateGlyphs() if (m_glyphCache == nullptr) return; - QVector<QGlyphRun> glyphRuns; + QList<QGlyphRun> glyphRuns; // collect all GlyphRuns generated by the QTextLayout if ((m_width > 0.0f || m_height > 0.0f) && !m_text.isEmpty()) { diff --git a/src/extras/text/qtext2dentity_p.h b/src/extras/text/qtext2dentity_p.h index ba907e7f9..99a2e3024 100644 --- a/src/extras/text/qtext2dentity_p.h +++ b/src/extras/text/qtext2dentity_p.h @@ -86,7 +86,7 @@ public: // keep track of the glyphs currently being displayed, // to guarantee proper glyph ref-counting in the // QDistanceFieldGlyphCache - QVector<QGlyphRun> m_currentGlyphRuns; + QList<QGlyphRun> m_currentGlyphRuns; QDistanceFieldGlyphCache *m_glyphCache; void setScene(Qt3DCore::QScene *scene) override; @@ -99,11 +99,11 @@ public: float m_width; float m_height; - QVector<DistanceFieldTextRenderer*> m_renderers; + QList<DistanceFieldTextRenderer*> m_renderers; float computeActualScale() const; - void setCurrentGlyphRuns(const QVector<QGlyphRun> &runs); + void setCurrentGlyphRuns(const QList<QGlyphRun> &runs); void clearCurrentGlyphRuns(); void updateGlyphs(); diff --git a/src/extras/text/qtextureatlas.cpp b/src/extras/text/qtextureatlas.cpp index d5d97a3a7..97f9845e0 100644 --- a/src/extras/text/qtextureatlas.cpp +++ b/src/extras/text/qtextureatlas.cpp @@ -71,7 +71,7 @@ void QTextureAtlasData::addImage(const AtlasTexture &texture, const QImage &imag QByteArray QTextureAtlasData::createUpdatedImageData() { m_mutex.lock(); - const QVector<Update> updates = std::move(m_updates); + const QList<Update> updates = std::move(m_updates); m_mutex.unlock(); // copy sub-images into the actual texture image diff --git a/src/extras/text/qtextureatlas_p_p.h b/src/extras/text/qtextureatlas_p_p.h index 0763ebd4c..f782abe19 100644 --- a/src/extras/text/qtextureatlas_p_p.h +++ b/src/extras/text/qtextureatlas_p_p.h @@ -91,7 +91,7 @@ private: QMutex m_mutex; QImage m_image; - QVector<Update> m_updates; + QList<Update> m_updates; }; typedef QSharedPointer<QTextureAtlasData> QTextureAtlasDataPtr; diff --git a/src/input/backend/action_p.h b/src/input/backend/action_p.h index 7036f04b9..e065f941d 100644 --- a/src/input/backend/action_p.h +++ b/src/input/backend/action_p.h @@ -65,13 +65,13 @@ class Q_AUTOTEST_EXPORT Action : public BackendNode public: Action(); void cleanup(); - inline QVector<Qt3DCore::QNodeId> inputs() const { return m_inputs; } + inline QList<Qt3DCore::QNodeId> inputs() const { return m_inputs; } inline bool actionTriggered() const { return m_actionTriggered; } void setActionTriggered(bool actionTriggered); void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; private: - QVector<Qt3DCore::QNodeId> m_inputs; + QList<Qt3DCore::QNodeId> m_inputs; bool m_actionTriggered; }; diff --git a/src/input/backend/actioninput_p.h b/src/input/backend/actioninput_p.h index eecf1d10e..cb891e849 100644 --- a/src/input/backend/actioninput_p.h +++ b/src/input/backend/actioninput_p.h @@ -67,14 +67,14 @@ public: ActionInput(); void cleanup(); - inline QVector<int> buttons() const { return m_buttons; } + inline QList<int> buttons() const { return m_buttons; } inline Qt3DCore::QNodeId sourceDevice() const { return m_sourceDevice; } void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; bool process(InputHandler *inputHandler, qint64 currentTime) override; private: - QVector<int> m_buttons; + QList<int> m_buttons; Qt3DCore::QNodeId m_sourceDevice; }; diff --git a/src/input/backend/assignkeyboardfocusjob.cpp b/src/input/backend/assignkeyboardfocusjob.cpp index 5fe329004..c1f11d475 100644 --- a/src/input/backend/assignkeyboardfocusjob.cpp +++ b/src/input/backend/assignkeyboardfocusjob.cpp @@ -59,7 +59,7 @@ public: void postFrame(Qt3DCore::QAspectManager *manager) override; - QVector<QPair<Qt3DCore::QNodeId, bool>> updates; + QList<QPair<Qt3DCore::QNodeId, bool>> updates; }; AssignKeyboardFocusJob::AssignKeyboardFocusJob(Qt3DCore::QNodeId keyboardDevice) diff --git a/src/input/backend/axis_p.h b/src/input/backend/axis_p.h index da4ec9ac6..fafdbbbf2 100644 --- a/src/input/backend/axis_p.h +++ b/src/input/backend/axis_p.h @@ -65,13 +65,13 @@ class Q_AUTOTEST_EXPORT Axis : public BackendNode public: Axis(); void cleanup(); - inline QVector<Qt3DCore::QNodeId> inputs() const { return m_inputs; } + inline QList<Qt3DCore::QNodeId> inputs() const { return m_inputs; } inline float axisValue() const { return m_axisValue; } void setAxisValue(float axisValue); void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; private: - QVector<Qt3DCore::QNodeId> m_inputs; + QList<Qt3DCore::QNodeId> m_inputs; float m_axisValue; }; diff --git a/src/input/backend/axisaccumulatorjob.cpp b/src/input/backend/axisaccumulatorjob.cpp index 16a68349e..39b85d10d 100644 --- a/src/input/backend/axisaccumulatorjob.cpp +++ b/src/input/backend/axisaccumulatorjob.cpp @@ -58,7 +58,7 @@ public: void postFrame(Qt3DCore::QAspectManager *manager) override; - QVector<AxisAccumulator *> updates; + QList<AxisAccumulator *> updates; }; AxisAccumulatorJob::AxisAccumulatorJob(AxisAccumulatorManager *axisAccumulatormanager, diff --git a/src/input/backend/axissetting_p.h b/src/input/backend/axissetting_p.h index 7d1e6ed4c..3df1c1534 100644 --- a/src/input/backend/axissetting_p.h +++ b/src/input/backend/axissetting_p.h @@ -65,7 +65,7 @@ public: void cleanup(); inline float deadZoneRadius() const { return m_deadZoneRadius; } - inline QVector<int> axes() const { return m_axes; } + inline QList<int> axes() const { return m_axes; } inline bool isSmoothEnabled() const { return m_smooth; } void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; @@ -73,7 +73,7 @@ public: private: float m_deadZoneRadius; - QVector<int> m_axes; + QList<int> m_axes; bool m_smooth; }; diff --git a/src/input/backend/buttonaxisinput.cpp b/src/input/backend/buttonaxisinput.cpp index 011d7df56..05eecdbd5 100644 --- a/src/input/backend/buttonaxisinput.cpp +++ b/src/input/backend/buttonaxisinput.cpp @@ -104,7 +104,7 @@ void ButtonAxisInput::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool fir namespace { -bool anyOfRequiredButtonsPressed(const QVector<int> &buttons, QAbstractPhysicalDeviceBackendNode *physicalDeviceBackend) +bool anyOfRequiredButtonsPressed(const QList<int> &buttons, QAbstractPhysicalDeviceBackendNode *physicalDeviceBackend) { bool validButtonWasPressed = false; for (int button : buttons) { diff --git a/src/input/backend/buttonaxisinput_p.h b/src/input/backend/buttonaxisinput_p.h index 761b9e92a..91f66ccfe 100644 --- a/src/input/backend/buttonaxisinput_p.h +++ b/src/input/backend/buttonaxisinput_p.h @@ -71,7 +71,7 @@ public: void cleanup() final; inline float scale() const { return m_scale; } - inline QVector<int> buttons() const { return m_buttons; } + inline QList<int> buttons() const { return m_buttons; } inline float acceleration() const { return m_acceleration < 0.0f ? qInf() : m_acceleration; } inline float deceleration() const { return m_deceleration < 0.0f ? qInf() : m_deceleration; } @@ -85,7 +85,7 @@ public: private: void updateSpeedRatio(qint64 currentTime, UpdateType type); - QVector<int> m_buttons; + QList<int> m_buttons; float m_scale; float m_acceleration; float m_deceleration; diff --git a/src/input/backend/inputchord_p.h b/src/input/backend/inputchord_p.h index 0a654aa87..0a2a5de21 100644 --- a/src/input/backend/inputchord_p.h +++ b/src/input/backend/inputchord_p.h @@ -67,7 +67,7 @@ public: InputChord(); void cleanup(); - inline QVector<Qt3DCore::QNodeId> chords() const { return m_chords; } + inline QList<Qt3DCore::QNodeId> chords() const { return m_chords; } inline qint64 timeout() const { return m_timeout; } inline qint64 startTime() const { return m_startTime; } void setStartTime(qint64 time); @@ -78,8 +78,8 @@ public: bool process(InputHandler *inputHandler, qint64 currentTime) override; private: - QVector<Qt3DCore::QNodeId> m_chords; - QVector<Qt3DCore::QNodeId> m_inputsToTrigger; + QList<Qt3DCore::QNodeId> m_chords; + QList<Qt3DCore::QNodeId> m_inputsToTrigger; qint64 m_timeout; qint64 m_startTime; }; diff --git a/src/input/backend/inputhandler.cpp b/src/input/backend/inputhandler.cpp index d201838d1..135741d2a 100644 --- a/src/input/backend/inputhandler.cpp +++ b/src/input/backend/inputhandler.cpp @@ -227,7 +227,7 @@ void Qt3DInput::Input::InputHandler::resetMouseAxisState() } } -QVector<QInputDeviceIntegration *> InputHandler::inputDeviceIntegrations() const +QList<QInputDeviceIntegration *> InputHandler::inputDeviceIntegrations() const { return m_inputDeviceIntegrations; } diff --git a/src/input/backend/inputhandler_p.h b/src/input/backend/inputhandler_p.h index a1c82b7cf..12ce7c76c 100644 --- a/src/input/backend/inputhandler_p.h +++ b/src/input/backend/inputhandler_p.h @@ -131,7 +131,7 @@ public: void resetMouseAxisState(); - QVector<Qt3DInput::QInputDeviceIntegration *> inputDeviceIntegrations() const; + QList<Qt3DInput::QInputDeviceIntegration *> inputDeviceIntegrations() const; void addInputDeviceIntegration(QInputDeviceIntegration *inputIntegration); void setInputSettings(InputSettings *settings); @@ -152,9 +152,9 @@ private: MouseDeviceManager *m_mouseDeviceManager; MouseInputManager *m_mouseInputManager; - QVector<HKeyboardDevice> m_activeKeyboardDevices; - QVector<HMouseDevice> m_activeMouseDevices; - QVector<HGenericDeviceBackendNode> m_activeGenericPhysicalDevices; + QList<HKeyboardDevice> m_activeKeyboardDevices; + QList<HMouseDevice> m_activeMouseDevices; + QList<HGenericDeviceBackendNode> m_activeGenericPhysicalDevices; InternalEventFilter *m_eventFilter; AxisManager *m_axisManager; @@ -169,7 +169,7 @@ private: LogicalDeviceManager *m_logicalDeviceManager; GenericDeviceBackendNodeManager *m_genericPhysicalDeviceBackendNodeManager; PhysicalDeviceProxyManager *m_physicalDeviceProxyManager; - QVector<Qt3DInput::QInputDeviceIntegration *> m_inputDeviceIntegrations; + QList<Qt3DInput::QInputDeviceIntegration *> m_inputDeviceIntegrations; InputSettings *m_settings; Qt3DCore::QEventFilterService *m_service; QObject *m_lastEventSource; diff --git a/src/input/backend/inputmanagers_p.h b/src/input/backend/inputmanagers_p.h index eee8b27d3..0a04646f5 100644 --- a/src/input/backend/inputmanagers_p.h +++ b/src/input/backend/inputmanagers_p.h @@ -180,12 +180,12 @@ class LogicalDeviceManager : public Qt3DCore::QResourceManager< public: LogicalDeviceManager() {} - QVector<HLogicalDevice> activeDevices() const { return m_activeDevices; } + QList<HLogicalDevice> activeDevices() const { return m_activeDevices; } void addActiveDevice(HLogicalDevice device) { m_activeDevices.push_back(device); } void removeActiveDevice(HLogicalDevice device) { m_activeDevices.removeOne(device); } private: - QVector<HLogicalDevice> m_activeDevices; + QList<HLogicalDevice> m_activeDevices; }; class GenericDeviceBackendNodeManager : public Qt3DCore::QResourceManager< @@ -204,10 +204,10 @@ public: PhysicalDeviceProxyManager() {} void addPendingProxyToLoad(Qt3DCore::QNodeId id) { m_pendingProxies.push_back(id); } - QVector<Qt3DCore::QNodeId> takePendingProxiesToLoad() { return std::move(m_pendingProxies); } + QList<Qt3DCore::QNodeId> takePendingProxiesToLoad() { return std::move(m_pendingProxies); } private: - QVector<Qt3DCore::QNodeId> m_pendingProxies; + QList<Qt3DCore::QNodeId> m_pendingProxies; }; class AxisAccumulatorManager : public Qt3DCore::QResourceManager< diff --git a/src/input/backend/inputsequence_p.h b/src/input/backend/inputsequence_p.h index 53407bd1d..7ab663a8f 100644 --- a/src/input/backend/inputsequence_p.h +++ b/src/input/backend/inputsequence_p.h @@ -67,7 +67,7 @@ public: InputSequence(); void cleanup(); - inline QVector<Qt3DCore::QNodeId> sequences() const { return m_sequences; } + inline QList<Qt3DCore::QNodeId> sequences() const { return m_sequences; } inline qint64 timeout() const { return m_timeout; } inline qint64 buttonInterval() const { return m_buttonInterval; } inline qint64 startTime() const { return m_startTime; } @@ -80,8 +80,8 @@ public: bool process(InputHandler *inputHandler, qint64 currentTime) override; private: - QVector<Qt3DCore::QNodeId> m_sequences; - QVector<Qt3DCore::QNodeId> m_inputsToTrigger; + QList<Qt3DCore::QNodeId> m_sequences; + QList<Qt3DCore::QNodeId> m_inputsToTrigger; qint64 m_timeout; qint64 m_buttonInterval; qint64 m_startTime; diff --git a/src/input/backend/keyboarddevice_p.h b/src/input/backend/keyboarddevice_p.h index 50660de61..a6b05611e 100644 --- a/src/input/backend/keyboarddevice_p.h +++ b/src/input/backend/keyboarddevice_p.h @@ -90,7 +90,7 @@ private: void setButtonValue(int key, bool value); InputHandler *m_inputHandler; - QVector<Qt3DCore::QNodeId> m_keyboardInputs; + QList<Qt3DCore::QNodeId> m_keyboardInputs; Qt3DCore::QNodeId m_lastRequester; Qt3DCore::QNodeId m_currentFocusItem; diff --git a/src/input/backend/keyboardmousegenericdeviceintegration.cpp b/src/input/backend/keyboardmousegenericdeviceintegration.cpp index 00699dcb5..fdbd10e30 100644 --- a/src/input/backend/keyboardmousegenericdeviceintegration.cpp +++ b/src/input/backend/keyboardmousegenericdeviceintegration.cpp @@ -74,10 +74,10 @@ QAbstractPhysicalDevice *KeyboardMouseGenericDeviceIntegration::createPhysicalDe return nullptr; } -QVector<Qt3DCore::QNodeId> KeyboardMouseGenericDeviceIntegration::physicalDevices() const +QList<Qt3DCore::QNodeId> KeyboardMouseGenericDeviceIntegration::physicalDevices() const { // TO DO: could return the ids of active KeyboardDevice/MouseDevice - return QVector<Qt3DCore::QNodeId>(); + return { }; } QAbstractPhysicalDeviceBackendNode *KeyboardMouseGenericDeviceIntegration::physicalDevice(Qt3DCore::QNodeId id) const diff --git a/src/input/backend/keyboardmousegenericdeviceintegration_p.h b/src/input/backend/keyboardmousegenericdeviceintegration_p.h index 1b64513bd..c2f894350 100644 --- a/src/input/backend/keyboardmousegenericdeviceintegration_p.h +++ b/src/input/backend/keyboardmousegenericdeviceintegration_p.h @@ -70,7 +70,7 @@ public: std::vector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) final; QAbstractPhysicalDevice *createPhysicalDevice(const QString &name) final; - QVector<Qt3DCore::QNodeId> physicalDevices() const final; + QList<Qt3DCore::QNodeId> physicalDevices() const final; QAbstractPhysicalDeviceBackendNode *physicalDevice(Qt3DCore::QNodeId id) const final; QStringList deviceNames() const final; diff --git a/src/input/backend/loadproxydevicejob.cpp b/src/input/backend/loadproxydevicejob.cpp index 69f14beae..5219a5546 100644 --- a/src/input/backend/loadproxydevicejob.cpp +++ b/src/input/backend/loadproxydevicejob.cpp @@ -58,7 +58,7 @@ public: void postFrame(Qt3DCore::QAspectManager *manager) override; - QVector<QPair<Qt3DCore::QNodeId, QAbstractPhysicalDevice *>> updates; + QList<QPair<Qt3DCore::QNodeId, QAbstractPhysicalDevice *>> updates; }; LoadProxyDeviceJob::LoadProxyDeviceJob() @@ -72,7 +72,7 @@ LoadProxyDeviceJob::~LoadProxyDeviceJob() { } -void LoadProxyDeviceJob::setProxiesToLoad(const QVector<Qt3DCore::QNodeId> &wrappers) +void LoadProxyDeviceJob::setProxiesToLoad(const QList<Qt3DCore::QNodeId> &wrappers) { m_proxies = wrappers; } @@ -87,7 +87,7 @@ InputHandler *LoadProxyDeviceJob::inputHandler() const return m_inputHandler; } -QVector<Qt3DCore::QNodeId> LoadProxyDeviceJob::proxies() const +QList<Qt3DCore::QNodeId> LoadProxyDeviceJob::proxies() const { return m_proxies; } diff --git a/src/input/backend/loadproxydevicejob_p.h b/src/input/backend/loadproxydevicejob_p.h index 0848c8529..a6d1568f7 100644 --- a/src/input/backend/loadproxydevicejob_p.h +++ b/src/input/backend/loadproxydevicejob_p.h @@ -68,18 +68,18 @@ public: LoadProxyDeviceJob(); ~LoadProxyDeviceJob(); - void setProxiesToLoad(const QVector<Qt3DCore::QNodeId> &proxies); + void setProxiesToLoad(const QList<Qt3DCore::QNodeId> &proxies); void setInputHandler(InputHandler *handler); InputHandler *inputHandler() const; - QVector<Qt3DCore::QNodeId> proxies() const; + QList<Qt3DCore::QNodeId> proxies() const; void run() final; private: Q_DECLARE_PRIVATE(LoadProxyDeviceJob) InputHandler *m_inputHandler; - QVector<Qt3DCore::QNodeId> m_proxies; + QList<Qt3DCore::QNodeId> m_proxies; }; typedef QSharedPointer<LoadProxyDeviceJob> LoadProxyDeviceJobPtr; diff --git a/src/input/backend/logicaldevice_p.h b/src/input/backend/logicaldevice_p.h index 6e75e0e77..c070ed6f8 100644 --- a/src/input/backend/logicaldevice_p.h +++ b/src/input/backend/logicaldevice_p.h @@ -68,14 +68,14 @@ public: LogicalDevice(); void cleanup(); - inline QVector<Qt3DCore::QNodeId> axes() const { return m_axes; } - inline QVector<Qt3DCore::QNodeId> actions() const { return m_actions; } + inline QList<Qt3DCore::QNodeId> axes() const { return m_axes; } + inline QList<Qt3DCore::QNodeId> actions() const { return m_actions; } void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; private: - QVector<Qt3DCore::QNodeId> m_axes; - QVector<Qt3DCore::QNodeId> m_actions; + QList<Qt3DCore::QNodeId> m_axes; + QList<Qt3DCore::QNodeId> m_actions; }; diff --git a/src/input/backend/movingaverage_p.h b/src/input/backend/movingaverage_p.h index 096f359d1..b2c85654b 100644 --- a/src/input/backend/movingaverage_p.h +++ b/src/input/backend/movingaverage_p.h @@ -52,7 +52,7 @@ // #include <QtCore/qglobal.h> -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE @@ -73,7 +73,7 @@ private: unsigned int m_sampleCount; unsigned int m_currentSample; float m_total; - QVector<float> m_samples; + QList<float> m_samples; }; } // Input diff --git a/src/input/backend/qabstractphysicaldevicebackendnode.cpp b/src/input/backend/qabstractphysicaldevicebackendnode.cpp index 18d932a21..f7447eb80 100644 --- a/src/input/backend/qabstractphysicaldevicebackendnode.cpp +++ b/src/input/backend/qabstractphysicaldevicebackendnode.cpp @@ -79,37 +79,31 @@ void QAbstractPhysicalDeviceBackendNodePrivate::addAxisSetting(int axisIdentifie axisIdSetting.m_axisSettingsId = axisSettingsId; // Replace if already present, otherwise append - bool replaced = false; - QVector<Input::AxisIdSetting>::iterator it; - QVector<Input::AxisIdSetting>::iterator end = m_axisSettings.end(); - for (it = m_axisSettings.begin(); it != end; ++it) { + const auto end = m_axisSettings.end(); + for (auto it = m_axisSettings.begin(); it != end; ++it) { if (it->m_axisIdentifier == axisIdentifier) { *it = axisIdSetting; - replaced = true; - break; + return; } } - - if (!replaced) - m_axisSettings.push_back(axisIdSetting); + m_axisSettings.push_back(axisIdSetting); } void QAbstractPhysicalDeviceBackendNodePrivate::removeAxisSetting(Qt3DCore::QNodeId axisSettingsId) { - QVector<Input::AxisIdSetting>::iterator it; - for (it = m_axisSettings.begin(); it != m_axisSettings.end(); ++it) { + const auto end = m_axisSettings.end(); + for (auto it = m_axisSettings.begin(); it != end; ++it) { if (it->m_axisSettingsId == axisSettingsId) { m_axisSettings.erase(it); - break; + return; } } } Input::MovingAverage &QAbstractPhysicalDeviceBackendNodePrivate::getOrCreateFilter(int axisIdentifier) { - QVector<Input::AxisIdFilter>::iterator it; - QVector<Input::AxisIdFilter>::iterator end = m_axisFilters.end(); - for (it = m_axisFilters.begin(); it != end; ++it) { + const auto end = m_axisFilters.end(); + for (auto it = m_axisFilters.begin(); it != end; ++it) { if (it->m_axisIdentifier == axisIdentifier) return it->m_filter; } @@ -196,9 +190,8 @@ float QAbstractPhysicalDeviceBackendNode::processedAxisValue(int axisIdentifier) // Find axis settings for this axis (if any) Qt3DCore::QNodeId axisSettingId; - QVector<Input::AxisIdSetting>::const_iterator it; - QVector<Input::AxisIdSetting>::const_iterator end = d->m_axisSettings.cend(); - for (it = d->m_axisSettings.cbegin(); it != end; ++it) { + const auto end = d->m_axisSettings.cend(); + for (auto it = d->m_axisSettings.cbegin(); it != end; ++it) { if (it->m_axisIdentifier == axisIdentifier) { axisSettingId = it->m_axisSettingsId; break; diff --git a/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h b/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h index 9156fc64d..f0e8c1c66 100644 --- a/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h +++ b/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> #include <Qt3DCore/qnodeid.h> #include <Qt3DInput/private/movingaverage_p.h> @@ -98,8 +98,8 @@ public: Input::AxisSetting *getAxisSetting(Qt3DCore::QNodeId axisSettingId) const; Qt3DCore::QNodeIdVector m_currentAxisSettingIds; - QVector<Input::AxisIdSetting> m_axisSettings; - QVector<Input::AxisIdFilter> m_axisFilters; + QList<Input::AxisIdSetting> m_axisSettings; + QList<Input::AxisIdFilter> m_axisFilters; QInputAspect *m_inputAspect; }; diff --git a/src/input/backend/updateaxisactionjob.cpp b/src/input/backend/updateaxisactionjob.cpp index 58ed36639..b230f6865 100644 --- a/src/input/backend/updateaxisactionjob.cpp +++ b/src/input/backend/updateaxisactionjob.cpp @@ -61,8 +61,8 @@ public: void postFrame(Qt3DCore::QAspectManager *manager) override; - QVector<QPair<Qt3DCore::QNodeId, bool>> m_triggeredActions; - QVector<QPair<Qt3DCore::QNodeId, float>> m_triggeredAxis; + QList<QPair<Qt3DCore::QNodeId, bool>> m_triggeredActions; + QList<QPair<Qt3DCore::QNodeId, float>> m_triggeredAxis; }; UpdateAxisActionJob::UpdateAxisActionJob(qint64 currentTime, InputHandler *handler, HLogicalDevice handle) diff --git a/src/input/frontend/qabstractphysicaldevice_p.h b/src/input/frontend/qabstractphysicaldevice_p.h index fc8ad561c..39c869fdf 100644 --- a/src/input/frontend/qabstractphysicaldevice_p.h +++ b/src/input/frontend/qabstractphysicaldevice_p.h @@ -53,8 +53,8 @@ #include <Qt3DInput/qt3dinput_global.h> #include <QtCore/qhash.h> +#include <QtCore/qlist.h> #include <QtCore/qmutex.h> -#include <QtCore/qvector.h> #include <Qt3DInput/private/qt3dinput_global_p.h> #include <Qt3DCore/private/qnode_p.h> @@ -72,12 +72,12 @@ public: ~QAbstractPhysicalDevicePrivate(); Q_DECLARE_PUBLIC(QAbstractPhysicalDevice) - QVector<QAxisSetting *> m_axisSettings; + QList<QAxisSetting *> m_axisSettings; QHash<QString, int> m_axesHash; QHash<QString, int> m_buttonsHash; - QVector<QPair<int, qreal>> m_pendingAxisEvents; - QVector<QPair<int, qreal>> m_pendingButtonsEvents; + QList<QPair<int, qreal>> m_pendingAxisEvents; + QList<QPair<int, qreal>> m_pendingButtonsEvents; void postAxisEvent(int axis, qreal value); void postButtonEvent(int button, qreal value); diff --git a/src/input/frontend/qaction_p.h b/src/input/frontend/qaction_p.h index 89c26323b..f2ce7b591 100644 --- a/src/input/frontend/qaction_p.h +++ b/src/input/frontend/qaction_p.h @@ -71,7 +71,7 @@ public: Q_DECLARE_PUBLIC(QAction) - QVector<QAbstractActionInput *> m_inputs; + QList<QAbstractActionInput *> m_inputs; bool m_active; void setActive(bool active) @@ -85,7 +85,7 @@ public: struct QActionData { - QVector<Qt3DCore::QNodeId> inputIds; + QList<Qt3DCore::QNodeId> inputIds; }; } // namespace Qt3DInput diff --git a/src/input/frontend/qactioninput_p.h b/src/input/frontend/qactioninput_p.h index 74a69d68c..28df810d7 100644 --- a/src/input/frontend/qactioninput_p.h +++ b/src/input/frontend/qactioninput_p.h @@ -70,14 +70,14 @@ class QActionInputPrivate : public QAbstractActionInputPrivate public: QActionInputPrivate(); - QVector<int> m_buttons; + QList<int> m_buttons; QAbstractPhysicalDevice *m_sourceDevice; }; struct QActionInputData { Qt3DCore::QNodeId sourceDeviceId; - QVector<int> buttons; + QList<int> buttons; }; } // Qt3DInput diff --git a/src/input/frontend/qaxis_p.h b/src/input/frontend/qaxis_p.h index 8d0582aa5..064119122 100644 --- a/src/input/frontend/qaxis_p.h +++ b/src/input/frontend/qaxis_p.h @@ -69,7 +69,7 @@ public: Q_DECLARE_PUBLIC(QAxis) - QVector<QAbstractAxisInput *> m_inputs; + QList<QAbstractAxisInput *> m_inputs; float m_value; void setValue(float value) @@ -83,7 +83,7 @@ public: struct QAxisData { - QVector<Qt3DCore::QNodeId> inputIds; + QList<Qt3DCore::QNodeId> inputIds; }; } // Qt3DInput diff --git a/src/input/frontend/qaxissetting_p.h b/src/input/frontend/qaxissetting_p.h index b3d162e8f..5e7f57171 100644 --- a/src/input/frontend/qaxissetting_p.h +++ b/src/input/frontend/qaxissetting_p.h @@ -68,14 +68,14 @@ public: {} float m_deadZoneRadius; - QVector<int> m_axes; + QList<int> m_axes; bool m_smooth; }; struct QAxisSettingData { float deadZoneRadius; - QVector<int> axes; + QList<int> axes; bool smooth; }; diff --git a/src/input/frontend/qbuttonaxisinput_p.h b/src/input/frontend/qbuttonaxisinput_p.h index 849498f06..4c16e0a9a 100644 --- a/src/input/frontend/qbuttonaxisinput_p.h +++ b/src/input/frontend/qbuttonaxisinput_p.h @@ -67,7 +67,7 @@ public: , m_deceleration(-1.0f) {} - QVector<int> m_buttons; + QList<int> m_buttons; float m_scale; float m_acceleration; float m_deceleration; @@ -75,7 +75,7 @@ public: struct QButtonAxisInputData : public QAbstractAxisInputData { - QVector<int> buttons; + QList<int> buttons; float scale; float acceleration; float deceleration; diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp index 3d2b6526b..0f95f93a3 100644 --- a/src/input/frontend/qinputaspect.cpp +++ b/src/input/frontend/qinputaspect.cpp @@ -242,7 +242,7 @@ std::vector<QAspectJobPtr> QInputAspect::jobsToExecute(qint64 time) jobs.insert(jobs.end(), std::make_move_iterator(integrationJobs.begin()), std::make_move_iterator(integrationJobs.end())); } - const QVector<Qt3DCore::QNodeId> proxiesToLoad = d->m_inputHandler->physicalDeviceProxyManager()->takePendingProxiesToLoad(); + const QList<Qt3DCore::QNodeId> proxiesToLoad = d->m_inputHandler->physicalDeviceProxyManager()->takePendingProxiesToLoad(); if (!proxiesToLoad.isEmpty()) { // Since loading wrappers occurs quite rarely, no point in keeping the job in a // member variable diff --git a/src/input/frontend/qinputchord_p.h b/src/input/frontend/qinputchord_p.h index 37cbbd9f2..2baa93340 100644 --- a/src/input/frontend/qinputchord_p.h +++ b/src/input/frontend/qinputchord_p.h @@ -71,7 +71,7 @@ public: QInputChordPrivate(); int m_timeout; - QVector<QAbstractActionInput *> m_chords; + QList<QAbstractActionInput *> m_chords; }; struct QInputChordData diff --git a/src/input/frontend/qinputdeviceintegration_p.h b/src/input/frontend/qinputdeviceintegration_p.h index 438e407fb..9a5618b04 100644 --- a/src/input/frontend/qinputdeviceintegration_p.h +++ b/src/input/frontend/qinputdeviceintegration_p.h @@ -92,7 +92,7 @@ public: virtual std::vector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) = 0; virtual QAbstractPhysicalDevice *createPhysicalDevice(const QString &name) = 0; - virtual QVector<Qt3DCore::QNodeId> physicalDevices() const = 0; + virtual QList<Qt3DCore::QNodeId> physicalDevices() const = 0; virtual QAbstractPhysicalDeviceBackendNode *physicalDevice(Qt3DCore::QNodeId id) const = 0; virtual QStringList deviceNames() const = 0; diff --git a/src/input/frontend/qinputsequence_p.h b/src/input/frontend/qinputsequence_p.h index b2807b2d5..bd7618576 100644 --- a/src/input/frontend/qinputsequence_p.h +++ b/src/input/frontend/qinputsequence_p.h @@ -72,7 +72,7 @@ public: int m_timeout; int m_buttonInterval; - QVector<QAbstractActionInput *> m_sequences; + QList<QAbstractActionInput *> m_sequences; }; struct QInputSequenceData diff --git a/src/input/frontend/qlogicaldevice_p.h b/src/input/frontend/qlogicaldevice_p.h index e04d238c5..794d5c232 100644 --- a/src/input/frontend/qlogicaldevice_p.h +++ b/src/input/frontend/qlogicaldevice_p.h @@ -68,14 +68,14 @@ public: QLogicalDevicePrivate(); ~QLogicalDevicePrivate(); - QVector<QAction *> m_actions; - QVector<QAxis *> m_axes; + QList<QAction *> m_actions; + QList<QAxis *> m_axes; }; struct QLogicalDeviceData { - QVector<Qt3DCore::QNodeId> actionIds; - QVector<Qt3DCore::QNodeId> axisIds; + QList<Qt3DCore::QNodeId> actionIds; + QList<Qt3DCore::QNodeId> axisIds; }; } // namespace Qt3DInput diff --git a/src/logic/executor.cpp b/src/logic/executor.cpp index 5a2f2dc51..b12c54ebe 100644 --- a/src/logic/executor.cpp +++ b/src/logic/executor.cpp @@ -61,12 +61,12 @@ Executor::Executor(QObject *parent) /*! Called from context of main thread */ -void Executor::processLogicFrameUpdates(const QVector<QNodeId> &nodeIds, float dt) +void Executor::processLogicFrameUpdates(const QList<QNodeId> &nodeIds, float dt) { if (!m_scene || nodeIds.isEmpty()) return; - const QVector<QNode *> nodes = m_scene->lookupNodes(nodeIds); + const QList<QNode *> nodes = m_scene->lookupNodes(nodeIds); for (QNode *node : nodes) { QFrameAction *frameAction = qobject_cast<QFrameAction *>(node); if (frameAction && frameAction->isEnabled()) diff --git a/src/logic/executor_p.h b/src/logic/executor_p.h index 1e9e0fa8d..700ca5ccb 100644 --- a/src/logic/executor_p.h +++ b/src/logic/executor_p.h @@ -75,7 +75,7 @@ public: void setScene(Qt3DCore::QScene *scene) { m_scene = scene; } public Q_SLOTS: - void processLogicFrameUpdates(const QVector<Qt3DCore::QNodeId> &nodeIds, float dt); + void processLogicFrameUpdates(const QList<Qt3DCore::QNodeId> &nodeIds, float dt); private: Qt3DCore::QScene *m_scene; diff --git a/src/logic/manager_p.h b/src/logic/manager_p.h index e4fa08a47..36b4f2094 100644 --- a/src/logic/manager_p.h +++ b/src/logic/manager_p.h @@ -91,8 +91,8 @@ public: private: QScopedPointer<HandlerManager> m_logicHandlerManager; - QVector<HHandler> m_logicHandlers; - QVector<Qt3DCore::QNodeId> m_logicComponentIds; + QList<HHandler> m_logicHandlers; + QList<Qt3DCore::QNodeId> m_logicComponentIds; QLogicAspect *m_logicAspect; Executor *m_executor; float m_dt; diff --git a/src/plugins/geometryloaders/default/basegeometryloader.cpp b/src/plugins/geometryloaders/default/basegeometryloader.cpp index 2ea773324..fe8c2d56c 100644 --- a/src/plugins/geometryloaders/default/basegeometryloader.cpp +++ b/src/plugins/geometryloaders/default/basegeometryloader.cpp @@ -93,9 +93,9 @@ bool BaseGeometryLoader::load(QIODevice *ioDev, const QString &subMesh) return true; } -void BaseGeometryLoader::generateAveragedNormals(const QVector<QVector3D>& points, - QVector<QVector3D>& normals, - const QVector<unsigned int>& faces) const +void BaseGeometryLoader::generateAveragedNormals(const QList<QVector3D> &points, + QList<QVector3D> &normals, + const QList<unsigned int> &faces) const { for (int i = 0; i < points.size(); ++i) normals.append(QVector3D()); @@ -206,15 +206,15 @@ void BaseGeometryLoader::generateGeometry() m_geometry->addAttribute(indexAttribute); } -void BaseGeometryLoader::generateTangents(const QVector<QVector3D>& points, - const QVector<QVector3D>& normals, - const QVector<unsigned int>& faces, - const QVector<QVector2D>& texCoords, - QVector<QVector4D>& tangents) const +void BaseGeometryLoader::generateTangents(const QList<QVector3D> &points, + const QList<QVector3D> &normals, + const QList<unsigned int> &faces, + const QList<QVector2D> &texCoords, + QList<QVector4D> &tangents) const { tangents.clear(); - QVector<QVector3D> tan1Accum; - QVector<QVector3D> tan2Accum; + QList<QVector3D> tan1Accum; + QList<QVector3D> tan2Accum; tan1Accum.resize(points.size()); tan2Accum.resize(points.size()); @@ -262,7 +262,7 @@ void BaseGeometryLoader::generateTangents(const QVector<QVector3D>& points, } } -void BaseGeometryLoader::center(QVector<QVector3D>& points) +void BaseGeometryLoader::center(QList<QVector3D> &points) { if (points.isEmpty()) return; diff --git a/src/plugins/geometryloaders/default/basegeometryloader_p.h b/src/plugins/geometryloaders/default/basegeometryloader_p.h index eb09e0cca..9c40e38bf 100644 --- a/src/plugins/geometryloaders/default/basegeometryloader_p.h +++ b/src/plugins/geometryloaders/default/basegeometryloader_p.h @@ -52,7 +52,7 @@ // #include <QtCore/QObject> -#include <QtCore/QVector> +#include <QtCore/QList> #include <QtGui/QVector2D> #include <QtGui/QVector3D> @@ -92,11 +92,11 @@ public: bool hasTextureCoordinates() const { return !m_texCoords.isEmpty(); } bool hasTangents() const { return !m_tangents.isEmpty(); } - QVector<QVector3D> vertices() const { return m_points; } - QVector<QVector3D> normals() const { return m_normals; } - QVector<QVector2D> textureCoordinates() const { return m_texCoords; } - QVector<QVector4D> tangents() const { return m_tangents; } - QVector<unsigned int> indices() const { return m_indices; } + QList<QVector3D> vertices() const { return m_points; } + QList<QVector3D> normals() const { return m_normals; } + QList<QVector2D> textureCoordinates() const { return m_texCoords; } + QList<QVector4D> tangents() const { return m_tangents; } + QList<unsigned int> indices() const { return m_indices; } Qt3DCore::QGeometry *geometry() const override; @@ -105,26 +105,26 @@ public: protected: virtual bool doLoad(QIODevice *ioDev, const QString &subMesh = QString()) = 0; - void generateAveragedNormals(const QVector<QVector3D>& points, - QVector<QVector3D>& normals, - const QVector<unsigned int>& faces) const; + void generateAveragedNormals(const QList<QVector3D>& points, + QList<QVector3D>& normals, + const QList<unsigned int>& faces) const; void generateGeometry(); - void generateTangents(const QVector<QVector3D>& points, - const QVector<QVector3D>& normals, - const QVector<unsigned int>& faces, - const QVector<QVector2D>& texCoords, - QVector<QVector4D>& tangents) const; - void center(QVector<QVector3D>& points); + void generateTangents(const QList<QVector3D>& points, + const QList<QVector3D>& normals, + const QList<unsigned int>& faces, + const QList<QVector2D>& texCoords, + QList<QVector4D>& tangents) const; + void center(QList<QVector3D>& points); bool m_loadTextureCoords; bool m_generateTangents; bool m_centerMesh; - QVector<QVector3D> m_points; - QVector<QVector3D> m_normals; - QVector<QVector2D> m_texCoords; - QVector<QVector4D> m_tangents; - QVector<unsigned int> m_indices; + QList<QVector3D> m_points; + QList<QVector3D> m_normals; + QList<QVector2D> m_texCoords; + QList<QVector4D> m_tangents; + QList<unsigned int> m_indices; Qt3DCore::QGeometry *m_geometry; }; diff --git a/src/plugins/geometryloaders/default/objgeometryloader.cpp b/src/plugins/geometryloaders/default/objgeometryloader.cpp index c0bd18563..484153216 100644 --- a/src/plugins/geometryloaders/default/objgeometryloader.cpp +++ b/src/plugins/geometryloaders/default/objgeometryloader.cpp @@ -49,8 +49,8 @@ namespace Qt3DRender { Q_LOGGING_CATEGORY(ObjGeometryLoaderLog, "Qt3D.ObjGeometryLoader", QtWarningMsg) static void addFaceVertex(const FaceIndices &faceIndices, - QVector<FaceIndices>& faceIndexVector, - QHash<FaceIndices, unsigned int>& faceIndexMap); + QList<FaceIndices> &faceIndexVector, + QHash<FaceIndices, unsigned int> &faceIndexMap); inline uint qHash(const FaceIndices &faceIndices) { @@ -65,11 +65,11 @@ bool ObjGeometryLoader::doLoad(QIODevice *ioDev, const QString &subMesh) // for the positions, normals and texture coords; // Generate unique vertices (in OpenGL parlance) and output to points, texCoords, // normals and calculate mapping from faces to unique indices - QVector<QVector3D> positions; - QVector<QVector3D> normals; - QVector<QVector2D> texCoords; + QList<QVector3D> positions; + QList<QVector3D> normals; + QList<QVector2D> texCoords; QHash<FaceIndices, unsigned int> faceIndexMap; - QVector<FaceIndices> faceIndexVector; + QList<FaceIndices> faceIndexVector; bool skipping = false; int positionsOffset = 0; @@ -246,8 +246,8 @@ bool ObjGeometryLoader::doLoad(QIODevice *ioDev, const QString &subMesh) } static void addFaceVertex(const FaceIndices &faceIndices, - QVector<FaceIndices>& faceIndexVector, - QHash<FaceIndices, unsigned int>&faceIndexMap) + QList<FaceIndices> &faceIndexVector, + QHash<FaceIndices, unsigned int> &faceIndexMap) { if (faceIndices.positionIndex != std::numeric_limits<unsigned int>::max()) { faceIndexVector.append(faceIndices); diff --git a/src/plugins/geometryloaders/default/plygeometryloader.cpp b/src/plugins/geometryloaders/default/plygeometryloader.cpp index 9b3042ec5..2c9223c66 100644 --- a/src/plugins/geometryloaders/default/plygeometryloader.cpp +++ b/src/plugins/geometryloaders/default/plygeometryloader.cpp @@ -370,7 +370,7 @@ bool PlyGeometryLoader::parseMesh(QIODevice *ioDev) QVector3D normal; QVector2D texCoord; - QVector<unsigned int> faceIndices; + QList<unsigned int> faceIndices; for (auto &property : element.properties) { if (property.dataType == TypeList) { diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicshelperinterface_p.h b/src/plugins/renderers/opengl/graphicshelpers/graphicshelperinterface_p.h index 11d501e03..6bfb363fc 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicshelperinterface_p.h +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicshelperinterface_p.h @@ -54,7 +54,6 @@ #include <QOpenGLFunctions> #include <QOpenGLTexture> #include <QOpenGLVersionFunctions> -#include <QVector> #include <shadervariables_p.h> #include <Qt3DRender/private/uniform_p.h> #include <Qt3DRender/qmemorybarrier.h> diff --git a/src/plugins/renderers/opengl/renderer/commandexecuter.cpp b/src/plugins/renderers/opengl/renderer/commandexecuter.cpp index ebb008df7..64878c926 100644 --- a/src/plugins/renderers/opengl/renderer/commandexecuter.cpp +++ b/src/plugins/renderers/opengl/renderer/commandexecuter.cpp @@ -235,7 +235,7 @@ CommandExecuter::CommandExecuter(Render::OpenGL::Renderer *renderer) void CommandExecuter::performAsynchronousCommandExecution(const std::vector<Render::OpenGL::RenderView *> &views) { QMutexLocker lock(&m_pendingCommandsMutex); - const QVector<Qt3DCore::Debug::AsynchronousCommandReply *> shellCommands = std::move(m_pendingCommands); + const QList<Qt3DCore::Debug::AsynchronousCommandReply *> shellCommands = std::move(m_pendingCommands); lock.unlock(); for (auto *reply : shellCommands) { diff --git a/src/plugins/renderers/opengl/renderer/commandexecuter_p.h b/src/plugins/renderers/opengl/renderer/commandexecuter_p.h index e87aafa14..25fc84282 100644 --- a/src/plugins/renderers/opengl/renderer/commandexecuter_p.h +++ b/src/plugins/renderers/opengl/renderer/commandexecuter_p.h @@ -48,9 +48,9 @@ // We mean it. // -#include <QVector> -#include <QVariant> +#include <QList> #include <QMutex> +#include <QVariant> QT_BEGIN_NAMESPACE @@ -84,7 +84,7 @@ public: private: Render::OpenGL::Renderer *m_renderer; - QVector<Qt3DCore::Debug::AsynchronousCommandReply *> m_pendingCommands; + QList<Qt3DCore::Debug::AsynchronousCommandReply *> m_pendingCommands; QMutex m_pendingCommandsMutex; }; diff --git a/src/plugins/renderers/opengl/renderer/frameprofiler_p.h b/src/plugins/renderers/opengl/renderer/frameprofiler_p.h index f1d235724..e94de299f 100644 --- a/src/plugins/renderers/opengl/renderer/frameprofiler_p.h +++ b/src/plugins/renderers/opengl/renderer/frameprofiler_p.h @@ -141,7 +141,7 @@ public: { #ifdef QT3D_SUPPORTS_GL_MONITOR if (m_monitor.isResultAvailable()) { - const QVector<GLuint64> samples = m_monitor.waitForSamples(); + const QList<GLuint64> samples = m_monitor.waitForSamples(); Q_ASSERT(samples.count() >= 2 * m_recordings.count()); Qt3DCore::QSystemInformationServicePrivate *dservice = Qt3DCore::QSystemInformationServicePrivate::get(m_service); @@ -179,7 +179,7 @@ private: #ifdef QT3D_SUPPORTS_GL_MONITOR QOpenGLTimeMonitor m_monitor; #endif - QVector<GLRecording> m_recordings; + QList<GLRecording> m_recordings; int m_remainingEvents = 0; }; @@ -232,9 +232,9 @@ public: private: Qt3DCore::QSystemInformationService *m_service; - QVector<FrameTimeRecorder *> m_recorders; - QVector<FrameTimeRecorder *> m_availableRecorders; - QVector<FrameTimeRecorder *> m_busyRecorders; + QList<FrameTimeRecorder *> m_recorders; + QList<FrameTimeRecorder *> m_availableRecorders; + QList<FrameTimeRecorder *> m_busyRecorders; FrameTimeRecorder *m_currentRecorder; }; diff --git a/src/plugins/renderers/opengl/renderer/renderer.cpp b/src/plugins/renderers/opengl/renderer/renderer.cpp index 2368e396d..2bfd13d67 100644 --- a/src/plugins/renderers/opengl/renderer/renderer.cpp +++ b/src/plugins/renderers/opengl/renderer/renderer.cpp @@ -782,7 +782,7 @@ void Renderer::enqueueRenderView(RenderView *renderView, int submitOrder) { QMutexLocker locker(m_renderQueue.mutex()); // Prevent out of order execution // We cannot use a lock free primitive here because: - // - QVector is not thread safe + // - QList is not thread safe // - Even if the insert is made correctly, the isFrameComplete call // could be invalid since depending on the order of execution // the counter could be complete but the renderview not yet added to the @@ -1511,7 +1511,7 @@ Renderer::ViewSubmissionResultData Renderer::submitRenderViews(const std::vector } // Wait for fences if needed - const QVector<WaitFence::Data> waitFences = renderView->waitFences(); + const QList<WaitFence::Data> waitFences = renderView->waitFences(); for (const auto &waitFence : waitFences) { // TO DO if (waitFence.handleType != QWaitFence::OpenGLFenceId) { @@ -2204,13 +2204,13 @@ bool Renderer::requiresVAOAttributeUpdate(Geometry *geometry, void Renderer::cleanGraphicsResources() { // Clean buffers - const QVector<Qt3DCore::QNodeId> buffersToRelease = m_nodesManager->bufferManager()->takeBuffersToRelease(); + const QList<Qt3DCore::QNodeId> buffersToRelease = m_nodesManager->bufferManager()->takeBuffersToRelease(); for (Qt3DCore::QNodeId bufferId : buffersToRelease) m_submissionContext->releaseBuffer(bufferId); // When Textures are cleaned up, their id is saved so that they can be // cleaned up in the render thread - const QVector<Qt3DCore::QNodeId> cleanedUpTextureIds = std::move(m_textureIdsToCleanup); + const QList<Qt3DCore::QNodeId> cleanedUpTextureIds = std::move(m_textureIdsToCleanup); for (const Qt3DCore::QNodeId textureCleanedUpId: cleanedUpTextureIds) cleanupTexture(textureCleanedUpId); @@ -2232,7 +2232,7 @@ void Renderer::cleanGraphicsResources() // Abandon GL shaders when a Shader node is destroyed Note: We are sure // that when this gets executed, all scene changes have been received and // shader nodes updated - const QVector<Qt3DCore::QNodeId> cleanedUpShaderIds = m_nodesManager->shaderManager()->takeShaderIdsToCleanup(); + const QList<Qt3DCore::QNodeId> cleanedUpShaderIds = m_nodesManager->shaderManager()->takeShaderIdsToCleanup(); for (const Qt3DCore::QNodeId shaderCleanedUpId: cleanedUpShaderIds) { cleanupShader(m_nodesManager->shaderManager()->lookupResource(shaderCleanedUpId)); // We can really release the texture at this point diff --git a/src/plugins/renderers/opengl/renderer/renderview.cpp b/src/plugins/renderers/opengl/renderer/renderview.cpp index 75f48827a..60252ed87 100644 --- a/src/plugins/renderers/opengl/renderer/renderview.cpp +++ b/src/plugins/renderers/opengl/renderer/renderview.cpp @@ -721,7 +721,7 @@ void sortByMaterial(EntityRenderCommandDataView *view, int begin, const int end) } void sortCommandRange(EntityRenderCommandDataView *view, int begin, int end, const int level, - const QVector<Qt3DRender::QSortPolicy::SortType> &sortingTypes) + const QList<Qt3DRender::QSortPolicy::SortType> &sortingTypes) { if (level >= sortingTypes.size()) return; @@ -936,7 +936,7 @@ EntityRenderCommandData RenderView::buildDrawRenderCommands(const Entity **entit Attribute *indexAttribute = nullptr; Attribute *indirectAttribute = nullptr; - const QVector<Qt3DCore::QNodeId> attributeIds = geometry->attributes(); + const QList<Qt3DCore::QNodeId> attributeIds = geometry->attributes(); for (Qt3DCore::QNodeId attributeId : attributeIds) { Attribute *attribute = m_manager->attributeManager()->lookupResource(attributeId); switch (attribute->attributeType()) { diff --git a/src/plugins/renderers/opengl/renderer/renderview_p.h b/src/plugins/renderers/opengl/renderer/renderview_p.h index 34a0526cc..f44d5c3a1 100644 --- a/src/plugins/renderers/opengl/renderer/renderview_p.h +++ b/src/plugins/renderers/opengl/renderer/renderview_p.h @@ -71,10 +71,10 @@ #include <renderer_p.h> -#include <QVector> -#include <QSurface> -#include <QMutex> #include <QColor> +#include <QList> +#include <QMutex> +#include <QSurface> QT_BEGIN_NAMESPACE @@ -176,7 +176,7 @@ public: inline Qt3DCore::QNodeIdVector insertFenceIds() const { return m_insertFenceIds; } inline void appendWaitFence(const WaitFence::Data &data) { m_waitFences.push_back(data); } - inline QVector<WaitFence::Data> waitFences() const { return m_waitFences; } + inline QList<WaitFence::Data> waitFences() const { return m_waitFences; } inline void setRenderPassFilter(const RenderPassFilter *rpFilter) Q_DECL_NOTHROW { m_passFilter = rpFilter; } inline const RenderPassFilter *renderPassFilter() const Q_DECL_NOTHROW { return m_passFilter; } @@ -241,7 +241,7 @@ public: void setRenderTargetId(Qt3DCore::QNodeId renderTargetId) Q_DECL_NOTHROW { m_renderTarget = renderTargetId; } Qt3DCore::QNodeId renderTargetId() const Q_DECL_NOTHROW { return m_renderTarget; } - void addSortType(const QVector<Qt3DRender::QSortPolicy::SortType> &sortTypes) { m_sortingTypes.append(sortTypes); } + void addSortType(const QList<Qt3DRender::QSortPolicy::SortType> &sortTypes) { m_sortingTypes.append(sortTypes); } void setSurface(QSurface *surface) { m_surface = surface; } QSurface *surface() const { return m_surface; } @@ -332,9 +332,9 @@ private: bool m_showDebugOverlay = false; int m_workGroups[3] = { 1, 1, 1}; QMemoryBarrier::Operations m_memoryBarrier = QMemoryBarrier::None; - QVector<Qt3DCore::QNodeId> m_insertFenceIds; - QVector<WaitFence::Data> m_waitFences; - QVector<Qt3DRender::QSortPolicy::SortType> m_sortingTypes; + QList<Qt3DCore::QNodeId> m_insertFenceIds; + QList<WaitFence::Data> m_waitFences; + QList<Qt3DRender::QSortPolicy::SortType> m_sortingTypes; Qt3DCore::QNodeIdVector m_proximityFilterIds; Qt3DCore::QNodeIdVector m_layerFilterIds; Matrix4x4 m_viewMatrix; diff --git a/src/plugins/renderers/opengl/renderer/shaderparameterpack_p.h b/src/plugins/renderers/opengl/renderer/shaderparameterpack_p.h index 00db57b19..3e4bdc5a1 100644 --- a/src/plugins/renderers/opengl/renderer/shaderparameterpack_p.h +++ b/src/plugins/renderers/opengl/renderer/shaderparameterpack_p.h @@ -53,7 +53,6 @@ #include <QVariant> #include <QByteArray> -#include <QVector> #include <QOpenGLShaderProgram> #include <Qt3DCore/qnodeid.h> #include <Qt3DRender/private/renderlogging_p.h> diff --git a/src/plugins/renderers/opengl/textures/gltexture.cpp b/src/plugins/renderers/opengl/textures/gltexture.cpp index f0cd34de1..08c96355a 100644 --- a/src/plugins/renderers/opengl/textures/gltexture.cpp +++ b/src/plugins/renderers/opengl/textures/gltexture.cpp @@ -180,7 +180,7 @@ bool GLTexture::loadTextureDataFromGenerator() m_properties.layers = m_textureData->layers(); m_properties.format = m_textureData->format(); - const QVector<QTextureImageDataPtr> imageData = m_textureData->imageData(); + const QList<QTextureImageDataPtr> imageData = m_textureData->imageData(); if (imageData.size() > 0) { // Set the mips level based on the first image if autoMipMapGeneration is disabled @@ -532,7 +532,7 @@ void GLTexture::uploadGLTextureData() { // Upload all QTexImageData set by the QTextureGenerator if (m_textureData) { - const QVector<QTextureImageDataPtr> imgData = m_textureData->imageData(); + const QList<QTextureImageDataPtr> imgData = m_textureData->imageData(); for (const QTextureImageDataPtr &data : imgData) { const int mipLevels = m_properties.generateMipMaps ? 1 : data->mipLevels(); diff --git a/src/plugins/renderers/rhi/renderer/renderer.cpp b/src/plugins/renderers/rhi/renderer/renderer.cpp index 75c9dbaae..ad69f37e5 100644 --- a/src/plugins/renderers/rhi/renderer/renderer.cpp +++ b/src/plugins/renderers/rhi/renderer/renderer.cpp @@ -2645,21 +2645,21 @@ void Renderer::cleanGraphicsResources() } // Clean buffers - const QVector<Qt3DCore::QNodeId> buffersToRelease = + const QList<Qt3DCore::QNodeId> buffersToRelease = m_nodesManager->bufferManager()->takeBuffersToRelease(); for (Qt3DCore::QNodeId bufferId : buffersToRelease) m_submissionContext->releaseBuffer(bufferId); // When Textures are cleaned up, their id is saved so that they can be // cleaned up in the render thread - const QVector<Qt3DCore::QNodeId> cleanedUpTextureIds = std::move(m_textureIdsToCleanup); + const QList<Qt3DCore::QNodeId> cleanedUpTextureIds = std::move(m_textureIdsToCleanup); for (const Qt3DCore::QNodeId textureCleanedUpId : cleanedUpTextureIds) cleanupTexture(textureCleanedUpId); // Abandon GL shaders when a Shader node is destroyed Note: We are sure // that when this gets executed, all scene changes have been received and // shader nodes updated - const QVector<Qt3DCore::QNodeId> cleanedUpShaderIds = + const QList<Qt3DCore::QNodeId> cleanedUpShaderIds = m_nodesManager->shaderManager()->takeShaderIdsToCleanup(); for (const Qt3DCore::QNodeId shaderCleanedUpId : cleanedUpShaderIds) { cleanupShader(m_nodesManager->shaderManager()->lookupResource(shaderCleanedUpId)); @@ -2667,7 +2667,7 @@ void Renderer::cleanGraphicsResources() m_nodesManager->shaderManager()->releaseResource(shaderCleanedUpId); } - const QVector<Qt3DCore::QNodeId> cleanedUpRenderTargetIds = + const QList<Qt3DCore::QNodeId> cleanedUpRenderTargetIds = m_nodesManager->renderTargetManager()->takeRenderTargetIdsToCleanup(); for (const Qt3DCore::QNodeId renderTargetCleanedUpId : cleanedUpRenderTargetIds) { cleanupRenderTarget(m_nodesManager->renderTargetManager()->lookupResource(renderTargetCleanedUpId)); diff --git a/src/plugins/renderers/rhi/renderer/renderview.cpp b/src/plugins/renderers/rhi/renderer/renderview.cpp index 7ae977c9b..7798611a3 100644 --- a/src/plugins/renderers/rhi/renderer/renderview.cpp +++ b/src/plugins/renderers/rhi/renderer/renderview.cpp @@ -881,7 +881,7 @@ EntityRenderCommandData RenderView::buildDrawRenderCommands(const Entity **entit Attribute *indexAttribute = nullptr; Attribute *indirectAttribute = nullptr; - const QVector<Qt3DCore::QNodeId> attributeIds = geometry->attributes(); + const QList<Qt3DCore::QNodeId> attributeIds = geometry->attributes(); for (Qt3DCore::QNodeId attributeId : attributeIds) { using namespace Qt3DCore; diff --git a/src/plugins/renderers/rhi/renderer/renderview_p.h b/src/plugins/renderers/rhi/renderer/renderview_p.h index 558992c4f..4d2bc289d 100644 --- a/src/plugins/renderers/rhi/renderer/renderview_p.h +++ b/src/plugins/renderers/rhi/renderer/renderview_p.h @@ -256,7 +256,7 @@ public: void setRenderTargetId(Qt3DCore::QNodeId renderTargetId) Q_DECL_NOTHROW { m_renderTarget = renderTargetId; } Qt3DCore::QNodeId renderTargetId() const Q_DECL_NOTHROW { return m_renderTarget; } - void addSortType(const QVector<Qt3DRender::QSortPolicy::SortType> &sortTypes) { Qt3DCore::append(m_sortingTypes, sortTypes); } + void addSortType(const QList<Qt3DRender::QSortPolicy::SortType> &sortTypes) { Qt3DCore::append(m_sortingTypes, sortTypes); } void setSurface(QSurface *surface) { m_surface = surface; } QSurface *surface() const { return m_surface; } diff --git a/src/plugins/renderers/rhi/renderer/rhishader.cpp b/src/plugins/renderers/rhi/renderer/rhishader.cpp index 268d2fa75..0e1c35b97 100644 --- a/src/plugins/renderers/rhi/renderer/rhishader.cpp +++ b/src/plugins/renderers/rhi/renderer/rhishader.cpp @@ -275,7 +275,7 @@ std::vector<T> stableRemoveDuplicates(std::vector<T> in, Pred predicate) // changes dims into [0, 3, 3] // Given dims == [0, 3, 3] and maxs == [4, 4, 4] // changes dims into [1, 0, 0] -bool incrementArray(QVarLengthArray<int> &dims, const QVector<int> &maxs) +bool incrementArray(QVarLengthArray<int> &dims, const QList<int> &maxs) { const int n = dims.size(); int i = n; @@ -302,7 +302,7 @@ bool incrementArray(QVarLengthArray<int> &dims, const QVector<int> &maxs) // for all valable array values, given an array of dimension sizes. // Dimensions must all be >= 1 template<typename F> -void forEachArrayAccessor(const QVector<int> &maxs, F f) +void forEachArrayAccessor(const QList<int> &maxs, F f) { if (std::any_of(maxs.begin(), maxs.end(), [](int v) { return v <= 0; })) return; diff --git a/src/plugins/renderers/rhi/renderer/rhishader_p.h b/src/plugins/renderers/rhi/renderer/rhishader_p.h index ba2b3293c..8b7fe18e0 100644 --- a/src/plugins/renderers/rhi/renderer/rhishader_p.h +++ b/src/plugins/renderers/rhi/renderer/rhishader_p.h @@ -72,7 +72,7 @@ public: struct UBO_Member { ShaderUniformBlock block; - QVector<QShaderDescription::BlockVariable> members; + QList<QShaderDescription::BlockVariable> members; }; RHIShader(); diff --git a/src/plugins/renderers/rhi/textures/texture.cpp b/src/plugins/renderers/rhi/textures/texture.cpp index d598aaf55..d45985e7a 100644 --- a/src/plugins/renderers/rhi/textures/texture.cpp +++ b/src/plugins/renderers/rhi/textures/texture.cpp @@ -356,7 +356,7 @@ bool RHITexture::loadTextureDataFromGenerator() m_properties.layers = m_textureData->layers(); m_properties.format = m_textureData->format(); - const QVector<QTextureImageDataPtr> &imageData = m_textureData->imageData(); + const QList<QTextureImageDataPtr> &imageData = m_textureData->imageData(); if (!imageData.empty()) { // Set the mips level based on the first image if autoMipMapGeneration is disabled diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp index a43c9abd0..bd87f7da8 100644 --- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp +++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp @@ -475,7 +475,7 @@ Qt3DCore::QEntity* GLTFImporter::node(const QString &id) // So if the node has only 1 mesh, we only create 1 QEntity // Otherwise if there are n meshes, there is 1 QEntity, with n children for each mesh/material combo { - QVector<QEntity *> entities; + QList<QEntity *> entities; const QJsonValue meshesValue = jsonObj.value(KEY_MESHES); if (meshesValue.isUndefined()) { @@ -2140,8 +2140,8 @@ QVariant GLTFImporter::parameterValueFromJSON(int type, const QJsonValue &value) QVector2D vector2D; QVector3D vector3D; QVector4D vector4D; - QVector<float> dataMat2(4, 0.0f); - QVector<float> dataMat3(9, 0.0f); + QList<float> dataMat2(4, 0.0f); + QList<float> dataMat3(9, 0.0f); switch (type) { case GL_BYTE: @@ -2518,7 +2518,7 @@ void GLTFImporter::populateRenderStates(QRenderPass *pass, const QJsonObject &st { // Process states to enable const QJsonArray enableStatesArray = states.value(KEY_ENABLE).toArray(); - QVector<int> enableStates; + QList<int> enableStates; for (const QJsonValue &enableValue : enableStatesArray) enableStates.append(enableValue.toInt()); diff --git a/src/plugins/sceneparsers/gltf/gltfio.cpp b/src/plugins/sceneparsers/gltf/gltfio.cpp index bfe99ab3f..45edcdb95 100644 --- a/src/plugins/sceneparsers/gltf/gltfio.cpp +++ b/src/plugins/sceneparsers/gltf/gltfio.cpp @@ -244,7 +244,7 @@ Qt3DCore::QEntity* GLTFIO::node(const QString &id) // So if the node has only 1 mesh, we only create 1 QEntity // Otherwise if there are n meshes, there is 1 QEntity, with n children for each mesh/material combo { - QVector<QEntity *> entities; + QList<QEntity *> entities; const auto meshes = jsonObj.value(KEY_MESHES).toArray(); for (const QJsonValue &mesh : meshes) { @@ -1040,7 +1040,7 @@ void GLTFIO::processJSONTechnique(const QString &id, const QJsonObject &jsonObje //Process states to enable const QJsonArray enableStatesArray = states.value(KEY_ENABLE).toArray(); - QVector<int> enableStates; + QList<int> enableStates; for (const QJsonValue &enableValue : enableStatesArray) enableStates.append(enableValue.toInt()); @@ -1293,8 +1293,8 @@ QVariant GLTFIO::parameterValueFromJSON(int type, const QJsonValue &value) const QVector2D vector2D; QVector3D vector3D; QVector4D vector4D; - QVector<float> dataMat2(4, 0.0f); - QVector<float> dataMat3(9, 0.0f); + QList<float> dataMat2(4, 0.0f); + QList<float> dataMat3(9, 0.0f); switch (type) { case GL_BYTE: diff --git a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp index 4a8855d8d..64c6d6f68 100644 --- a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp +++ b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp @@ -147,7 +147,7 @@ QT_BEGIN_NAMESPACE QVariantList Quick3DShaderDataArrayToVariantListConverter(Qt3DRender::Render::Quick::Quick3DShaderDataArray *array) { - const QVector<Qt3DRender::QShaderData *> arrayValues = array->values(); + const QList<Qt3DRender::QShaderData *> arrayValues = array->values(); QVariantList values; values.reserve(arrayValues.size()); for (Qt3DRender::QShaderData *data : arrayValues) diff --git a/src/quick3d/imports/scene3d/scene3ditem.cpp b/src/quick3d/imports/scene3d/scene3ditem.cpp index 9189cf669..7b89ce91b 100644 --- a/src/quick3d/imports/scene3d/scene3ditem.cpp +++ b/src/quick3d/imports/scene3d/scene3ditem.cpp @@ -362,7 +362,7 @@ void Scene3DItem::addView(Scene3DView *view) surfaceSelector->setSurface(window()); // Copy setting properties from first View - QVector<Qt3DRender::QRenderSettings *> viewRenderSettings = subtreeRoot->componentsOfType<Qt3DRender::QRenderSettings>(); + const QList<Qt3DRender::QRenderSettings *> viewRenderSettings = subtreeRoot->componentsOfType<Qt3DRender::QRenderSettings>(); if (viewRenderSettings.size() > 0) { Qt3DRender::QRenderSettings *viewRenderSetting = viewRenderSettings.first(); settings->setRenderPolicy(viewRenderSetting->renderPolicy()); diff --git a/src/quick3d/imports/scene3d/scene3ditem_p.h b/src/quick3d/imports/scene3d/scene3ditem_p.h index 8ee0b97a3..03de6ca0f 100644 --- a/src/quick3d/imports/scene3d/scene3ditem_p.h +++ b/src/quick3d/imports/scene3d/scene3ditem_p.h @@ -163,7 +163,7 @@ private: CameraAspectRatioMode m_cameraAspectRatioMode; CompositingMode m_compositingMode; QOffscreenSurface *m_dummySurface; - QVector<Scene3DView *> m_views; + QList<Scene3DView *> m_views; QMetaObject::Connection m_windowConnection; }; diff --git a/src/quick3d/imports/scene3d/scene3drenderer.cpp b/src/quick3d/imports/scene3d/scene3drenderer.cpp index 7b7f46126..e8ffdea60 100644 --- a/src/quick3d/imports/scene3d/scene3drenderer.cpp +++ b/src/quick3d/imports/scene3d/scene3drenderer.cpp @@ -389,7 +389,7 @@ void Scene3DRenderer::setSkipFrame(bool skip) } // Main Thread, Render Thread locked -void Scene3DRenderer::setScene3DViews(const QVector<Scene3DView *> views) +void Scene3DRenderer::setScene3DViews(const QList<Scene3DView *> &views) { m_views = views; m_dirtyViews = true; diff --git a/src/quick3d/imports/scene3d/scene3drenderer_p.h b/src/quick3d/imports/scene3d/scene3drenderer_p.h index e6e7b0036..5c57f71e3 100644 --- a/src/quick3d/imports/scene3d/scene3drenderer_p.h +++ b/src/quick3d/imports/scene3d/scene3drenderer_p.h @@ -86,7 +86,7 @@ public: void allowRender(); void setCompositingMode(Scene3DItem::CompositingMode mode); void setSkipFrame(bool skip); - void setScene3DViews(const QVector<Scene3DView *> views); + void setScene3DViews(const QList<Scene3DView *> &views); void init(Scene3DItem *item, Qt3DCore::QAspectEngine *aspectEngine, QRenderAspect *renderAspect); QRenderAspect *renderAspect() const @@ -124,7 +124,7 @@ private: bool m_skipFrame; QSemaphore m_allowRendering; Scene3DItem::CompositingMode m_compositingMode; - QVector<Scene3DView *> m_views; + QList<Scene3DView *> m_views; bool m_resetRequested = false; quint32 m_textureId; diff --git a/src/quick3d/quick3d/items/quick3dentity_p.h b/src/quick3d/quick3d/items/quick3dentity_p.h index fe895f3ec..2ced2d141 100644 --- a/src/quick3d/quick3d/items/quick3dentity_p.h +++ b/src/quick3d/quick3d/items/quick3dentity_p.h @@ -84,7 +84,7 @@ private: static int qmlComponentsCount(QQmlListProperty<Qt3DCore::QComponent> *list); static void qmlClearComponents(QQmlListProperty<Qt3DCore::QComponent> *list); - QVector<Qt3DCore::QComponent *> m_managedComponents; + QList<Qt3DCore::QComponent *> m_managedComponents; }; } // namespace Quick diff --git a/src/quick3d/quick3d/items/quick3dgeometry_p.h b/src/quick3d/quick3d/items/quick3dgeometry_p.h index 39bafbea7..5f7b001d6 100644 --- a/src/quick3d/quick3d/items/quick3dgeometry_p.h +++ b/src/quick3d/quick3d/items/quick3dgeometry_p.h @@ -79,7 +79,7 @@ private: static int attributesCount(QQmlListProperty<Qt3DCore::QAttribute> *list); static void clearAttributes(QQmlListProperty<Qt3DCore::QAttribute> *list); - QVector<Qt3DCore::QAttribute *> m_managedAttributes; + QList<Qt3DCore::QAttribute *> m_managedAttributes; }; } // namespace Quick diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp index 938747a95..2d5d9b131 100644 --- a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp +++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp @@ -84,7 +84,7 @@ public: QVariant m_model; QQmlInstanceModel *m_instanceModel; QQmlComponent *m_delegate; - QVector<QPointer<QObject> > m_objects; + QList<QPointer<QObject>> m_objects; }; /*! @@ -183,7 +183,7 @@ void Quick3DNodeInstantiatorPrivate::_q_modelUpdated(const QQmlChangeSet &change } int difference = 0; - QHash<int, QVector<QPointer<QObject> > > moved; + QHash<int, QList<QPointer<QObject>>> moved; const auto removes = changeSet.removes(); for (const QQmlChangeSet::Change &remove : removes) { int index = qMin(remove.index, m_objects.count()); @@ -210,7 +210,7 @@ void Quick3DNodeInstantiatorPrivate::_q_modelUpdated(const QQmlChangeSet &change for (const QQmlChangeSet::Change &insert : inserts) { int index = qMin(insert.index, m_objects.count()); if (insert.isMove()) { - QVector<QPointer<QObject> > movedObjects = moved.value(insert.moveId); + QList<QPointer<QObject>> movedObjects = moved.value(insert.moveId); m_objects = m_objects.mid(0, index) + movedObjects + m_objects.mid(index); } else for (int i = 0; i < insert.count; ++i) { int modelIndex = index + i; diff --git a/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp b/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp index dc6183989..23f39460c 100644 --- a/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp +++ b/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp @@ -83,7 +83,7 @@ void QQuick3DAnimationController::clearAnimationGroups(QQmlListProperty<QAnimati { QQuick3DAnimationController *controller = qobject_cast<QQuick3DAnimationController *>(list->object); if (controller) { - QVector<QAnimationGroup *> emptyList; + QList<QAnimationGroup *> emptyList; controller->parentAnimationController()->setAnimationGroups(emptyList); } } diff --git a/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp b/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp index f10450280..b7ad3b3bc 100644 --- a/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp +++ b/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp @@ -88,7 +88,7 @@ void QQuick3DAnimationGroup::clearAnimation(QQmlListProperty<Qt3DAnimation::QAbs { QQuick3DAnimationGroup *animationGroup = qobject_cast<QQuick3DAnimationGroup *>(list->object); if (animationGroup) { - QVector<Qt3DAnimation::QAbstractAnimation *> emptyList; + QList<Qt3DAnimation::QAbstractAnimation *> emptyList; animationGroup->parentAnimationGroup()->setAnimations(emptyList); } } diff --git a/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp b/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp index f7cf133fe..0137f85ff 100644 --- a/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp +++ b/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp @@ -90,7 +90,7 @@ void QQuick3DKeyframeAnimation::clearKeyframes(QQmlListProperty<Qt3DCore::QTrans QQuick3DKeyframeAnimation *keyframeAnimation = qobject_cast<QQuick3DKeyframeAnimation *>(list->object); if (keyframeAnimation) { - QVector<Qt3DCore::QTransform *> emptyList; + QList<Qt3DCore::QTransform *> emptyList; keyframeAnimation->parentKeyframeAnimation()->setKeyframes(emptyList); } } diff --git a/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp b/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp index 997e2e215..afe15b914 100644 --- a/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp +++ b/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp @@ -86,7 +86,7 @@ void QQuick3DMorphingAnimation::clearMorphTargets(QQmlListProperty<Qt3DAnimation { QQuick3DMorphingAnimation *animation = qobject_cast<QQuick3DMorphingAnimation *>(list->object); if (animation) { - QVector<Qt3DAnimation::QMorphTarget *> emptyList; + QList<Qt3DAnimation::QMorphTarget *> emptyList; animation->parentMorphingAnimation()->setMorphTargets(emptyList); } } diff --git a/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp b/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp index 030d5abe5..b1bb76f1c 100644 --- a/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp +++ b/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp @@ -82,7 +82,7 @@ void QQuick3DMorphTarget::clearAttributes(QQmlListProperty<Qt3DCore::QAttribute> { QQuick3DMorphTarget *target = qobject_cast<QQuick3DMorphTarget *>(list->object); if (target) { - QVector<Qt3DCore::QAttribute *> emptyList; + QList<Qt3DCore::QAttribute *> emptyList; target->parentMorphTarget()->setAttributes(emptyList); } } diff --git a/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp b/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp index 2dffb7858..48b361e39 100644 --- a/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp +++ b/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp @@ -93,7 +93,7 @@ void QQuick3DVertexBlendAnimation::clearMorphTargets(QQmlListProperty<Qt3DAnimat QQuick3DVertexBlendAnimation *animation = qobject_cast<QQuick3DVertexBlendAnimation *>(list->object); if (animation) { - QVector<Qt3DAnimation::QMorphTarget *> emptyList; + QList<Qt3DAnimation::QMorphTarget *> emptyList; animation->parentVertexBlendAnimation()->setMorphTargets(emptyList); } } diff --git a/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader.cpp b/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader.cpp index 087342063..ee505b1cf 100644 --- a/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader.cpp +++ b/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader.cpp @@ -144,13 +144,13 @@ void Quick3DLevelOfDetailLoader::setThresholdType(Qt3DRender::QLevelOfDetail::Th d->m_lod->setThresholdType(thresholdType); } -QVector<qreal> Quick3DLevelOfDetailLoader::thresholds() const +QList<qreal> Quick3DLevelOfDetailLoader::thresholds() const { Q_D(const Quick3DLevelOfDetailLoader); return d->m_lod->thresholds(); } -void Quick3DLevelOfDetailLoader::setThresholds(const QVector<qreal> &thresholds) +void Quick3DLevelOfDetailLoader::setThresholds(const QList<qreal> &thresholds) { Q_D(Quick3DLevelOfDetailLoader); d->m_lod->setThresholds(thresholds); diff --git a/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader_p.h b/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader_p.h index adc756e96..5d669c7f8 100644 --- a/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader_p.h +++ b/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader_p.h @@ -71,7 +71,7 @@ class Q_3DQUICKEXTRASSHARED_PRIVATE_EXPORT Quick3DLevelOfDetailLoader : public Q Q_PROPERTY(Qt3DRender::QCamera *camera READ camera WRITE setCamera NOTIFY cameraChanged) Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) Q_PROPERTY(Qt3DRender::QLevelOfDetail::ThresholdType thresholdType READ thresholdType WRITE setThresholdType NOTIFY thresholdTypeChanged) - Q_PROPERTY(QVector<qreal> thresholds READ thresholds WRITE setThresholds NOTIFY thresholdsChanged) + Q_PROPERTY(QList<qreal> thresholds READ thresholds WRITE setThresholds NOTIFY thresholdsChanged) Q_PROPERTY(Qt3DRender::QLevelOfDetailBoundingSphere volumeOverride READ volumeOverride WRITE setVolumeOverride NOTIFY volumeOverrideChanged) Q_PROPERTY(QObject *entity READ entity NOTIFY entityChanged) @@ -88,8 +88,8 @@ public: void setCurrentIndex(int currentIndex); Qt3DRender::QLevelOfDetail::ThresholdType thresholdType() const; void setThresholdType(Qt3DRender::QLevelOfDetail::ThresholdType thresholdType); - QVector<qreal> thresholds() const; - void setThresholds(const QVector<qreal> &thresholds); + QList<qreal> thresholds() const; + void setThresholds(const QList<qreal> &thresholds); Qt3DRender::QLevelOfDetailBoundingSphere volumeOverride() const; void setVolumeOverride(const Qt3DRender::QLevelOfDetailBoundingSphere &volumeOverride); diff --git a/src/quick3d/quick3drender/items/quick3drendertargetselector.cpp b/src/quick3d/quick3drender/items/quick3drendertargetselector.cpp index 1ace5950a..ce9ebd976 100644 --- a/src/quick3d/quick3drender/items/quick3drendertargetselector.cpp +++ b/src/quick3d/quick3drender/items/quick3drendertargetselector.cpp @@ -70,7 +70,7 @@ void Quick3DRenderTargetSelector::setDrawBuffers(const QVariantList &buffers) if (buffers != drawBuffers()) { // Converts int to RenderAttachmentType - QVector<QRenderTargetOutput::AttachmentPoint> drawBuffersList; + QList<QRenderTargetOutput::AttachmentPoint> drawBuffersList; drawBuffersList.reserve(buffers.size()); for (const QVariant &buf : buffers) drawBuffersList.append(static_cast<QRenderTargetOutput::AttachmentPoint>(buf.toInt())); diff --git a/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp b/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp index 9dac7bbc6..36681b021 100644 --- a/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp +++ b/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp @@ -53,7 +53,7 @@ public: : QNodePrivate() {} - QVector<QShaderData *> m_values; + QList<QShaderData *> m_values; }; Quick3DShaderDataArray::Quick3DShaderDataArray(QNode *parent) @@ -70,7 +70,7 @@ QQmlListProperty<QShaderData> Quick3DShaderDataArray::valuesList() &Quick3DShaderDataArray::clearValues); } -QVector<QShaderData *> Quick3DShaderDataArray::values() const +QList<QShaderData *> Quick3DShaderDataArray::values() const { Q_D(const Quick3DShaderDataArray); return d->m_values; diff --git a/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h b/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h index 86d11d13c..a7c7ae833 100644 --- a/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h +++ b/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h @@ -78,7 +78,7 @@ class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DShaderDataArray : public Qt3DC public: explicit Quick3DShaderDataArray(Qt3DCore::QNode *parent = 0); QQmlListProperty<QShaderData> valuesList(); - QVector<QShaderData *> values() const; + QList<QShaderData *> values() const; private: static void appendValue(QQmlListProperty<QShaderData> *list, QShaderData *bar); diff --git a/src/quick3d/quick3dscene2d/items/qscene2d_p.h b/src/quick3d/quick3dscene2d/items/qscene2d_p.h index 4814564c2..801cac95f 100644 --- a/src/quick3d/quick3dscene2d/items/qscene2d_p.h +++ b/src/quick3d/quick3dscene2d/items/qscene2d_p.h @@ -77,7 +77,7 @@ public: Scene2DManager *m_renderManager; QMetaObject::Connection m_textureDestroyedConnection; Qt3DRender::QRenderTargetOutput *m_output; - QVector<Qt3DCore::QEntity *> m_entities; + QList<Qt3DCore::QEntity *> m_entities; }; struct QScene2DData @@ -85,7 +85,7 @@ struct QScene2DData QScene2D::RenderPolicy renderPolicy; Scene2DSharedObjectPtr sharedObject; Qt3DCore::QNodeId output; - QVector<Qt3DCore::QNodeId> entityIds; + QList<Qt3DCore::QNodeId> entityIds; bool mouseEnabled; }; diff --git a/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp b/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp index 83cbefc59..8a8577713 100644 --- a/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp +++ b/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp @@ -87,7 +87,7 @@ void QQuick3DScene2D::clearEntities(QQmlListProperty<Qt3DCore::QEntity> *list) { QQuick3DScene2D *scene2d = qobject_cast<QQuick3DScene2D *>(list->object); if (scene2d) { - QVector<Qt3DCore::QEntity*> entities = scene2d->parentScene2D()->entities(); + QList<Qt3DCore::QEntity*> entities = scene2d->parentScene2D()->entities(); for (Qt3DCore::QEntity *e : entities) scene2d->parentScene2D()->removeEntity(e); } diff --git a/src/quick3d/quick3dscene2d/items/scene2d_p.h b/src/quick3d/quick3dscene2d/items/scene2d_p.h index 9424a5a59..67426ae78 100644 --- a/src/quick3d/quick3dscene2d/items/scene2d_p.h +++ b/src/quick3d/quick3dscene2d/items/scene2d_p.h @@ -117,9 +117,9 @@ public: bool m_renderInitialized; bool m_mouseEnabled; Qt3DRender::Quick::QScene2D::RenderPolicy m_renderPolicy; - QVector<Qt3DCore::QNodeId> m_entities; + QList<Qt3DCore::QNodeId> m_entities; Qt3DRender::QPickEventPtr m_cachedPickEvent; - QVector<QMetaObject::Connection> m_connections; + QList<QMetaObject::Connection> m_connections; }; } // Quick |