summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-02-29 10:29:11 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-03-01 19:26:36 +0000
commit8b934a94087e13c4a6989bdf17a75e4c5c09718f (patch)
treedda6fb491ad0729c55689eb1881f5092dbf21e0e
parent5a2c1a2e611ab0eee3fa966007a851914bb650d6 (diff)
Fix uses of inefficient QList<QNodeId>
QNodeId is a 64-bit type, so holding it in QList on 32-bit platforms is horribly inefficient. Fix by porting to QVector instead. [ChangeLog][Important Behavior Changes] QNodeIds are now passed and accepted in QVectors, not QLists. Change-Id: I3cbe35d639eb2ddf9d106294f542f65b431dc4a4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/core/qscene.cpp8
-rw-r--r--src/core/qscene_p.h2
-rw-r--r--src/render/backend/entity.cpp6
-rw-r--r--src/render/backend/entity_p.h16
-rw-r--r--src/render/backend/parameterpack.cpp2
-rw-r--r--src/render/backend/parameterpack_p.h4
-rw-r--r--src/render/backend/rendertarget.cpp2
-rw-r--r--src/render/backend/rendertarget_p.h4
-rw-r--r--src/render/backend/renderview_p.h4
-rw-r--r--src/render/framegraph/framegraphnode.cpp2
-rw-r--r--src/render/framegraph/framegraphnode_p.h4
-rw-r--r--src/render/framegraph/renderpassfilternode.cpp4
-rw-r--r--src/render/framegraph/renderpassfilternode_p.h6
-rw-r--r--src/render/framegraph/sortmethod.cpp2
-rw-r--r--src/render/framegraph/sortmethod_p.h4
-rw-r--r--src/render/framegraph/techniquefilternode.cpp4
-rw-r--r--src/render/framegraph/techniquefilternode_p.h6
-rw-r--r--src/render/io/qsceneloader.cpp2
-rw-r--r--src/render/jobs/renderviewjobutils.cpp2
-rw-r--r--src/render/jobs/renderviewjobutils_p.h2
-rw-r--r--src/render/materialsystem/effect.cpp4
-rw-r--r--src/render/materialsystem/effect_p.h6
-rw-r--r--src/render/materialsystem/material.cpp2
-rw-r--r--src/render/materialsystem/material_p.h2
-rw-r--r--src/render/materialsystem/renderpass.cpp4
-rw-r--r--src/render/materialsystem/renderpass_p.h6
-rw-r--r--src/render/materialsystem/shaderdata.cpp4
-rw-r--r--src/render/materialsystem/shaderdata_p.h2
-rw-r--r--src/render/materialsystem/technique.cpp6
-rw-r--r--src/render/materialsystem/technique_p.h10
-rw-r--r--src/render/texture/textureimage_p.h2
-rw-r--r--tests/auto/core/cloning/tst_cloning.cpp2
-rw-r--r--tests/auto/core/qscene/tst_qscene.cpp2
-rw-r--r--tests/auto/render/entity/tst_entity.cpp6
34 files changed, 74 insertions, 70 deletions
diff --git a/src/core/qscene.cpp b/src/core/qscene.cpp
index c8cc990a3..cbbdca01c 100644
--- a/src/core/qscene.cpp
+++ b/src/core/qscene.cpp
@@ -182,11 +182,15 @@ QLockableObserverInterface *QScene::arbiter() const
return d->m_arbiter;
}
-QList<QNodeId> QScene::entitiesForComponent(QNodeId id) const
+QVector<QNodeId> QScene::entitiesForComponent(QNodeId id) const
{
Q_D(const QScene);
QReadLocker lock(&d->m_lock);
- return d->m_componentToEntities.values(id);
+ QVector<QNodeId> result;
+ const auto p = d->m_componentToEntities.equal_range(id);
+ for (auto it = p.first; it != p.second; ++it)
+ result.push_back(*it);
+ return result;
}
void QScene::addEntityForComponent(QNodeId componentUuid, QNodeId entityUuid)
diff --git a/src/core/qscene_p.h b/src/core/qscene_p.h
index e0b500ce5..4bd773eac 100644
--- a/src/core/qscene_p.h
+++ b/src/core/qscene_p.h
@@ -87,7 +87,7 @@ public:
Qt3DCore::QLockableObserverInterface *arbiter() const;
// Component -> Entities
- QList<QNodeId> entitiesForComponent(QNodeId id) const;
+ QVector<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/render/backend/entity.cpp b/src/render/backend/entity.cpp
index f20def97a..5a25c2157 100644
--- a/src/render/backend/entity.cpp
+++ b/src/render/backend/entity.cpp
@@ -498,10 +498,10 @@ template<>
Qt3DCore::QNodeId Entity::componentUuid<Material>() const { return m_materialComponent; }
template<>
-QList<Qt3DCore::QNodeId> Entity::componentsUuid<Layer>() const { return m_layerComponents; }
+QVector<Qt3DCore::QNodeId> Entity::componentsUuid<Layer>() const { return m_layerComponents; }
template<>
-QList<Qt3DCore::QNodeId> Entity::componentsUuid<ShaderData>() const { return m_shaderDataComponents; }
+QVector<Qt3DCore::QNodeId> Entity::componentsUuid<ShaderData>() const { return m_shaderDataComponents; }
template<>
Qt3DCore::QNodeId Entity::componentUuid<GeometryRenderer>() const { return m_geometryRendererComponent; }
@@ -516,7 +516,7 @@ template<>
QNodeId Entity::componentUuid<ComputeJob>() const { return m_computeComponent; }
template<>
-QList<Qt3DCore::QNodeId> Entity::componentsUuid<Light>() const { return m_lightComponents; }
+QVector<Qt3DCore::QNodeId> Entity::componentsUuid<Light>() const { return m_lightComponents; }
RenderEntityFunctor::RenderEntityFunctor(AbstractRenderer *renderer, NodeManagers *manager)
: m_nodeManagers(manager)
diff --git a/src/render/backend/entity_p.h b/src/render/backend/entity_p.h
index fdf4038b1..c31096f26 100644
--- a/src/render/backend/entity_p.h
+++ b/src/render/backend/entity_p.h
@@ -149,9 +149,9 @@ public:
}
template<class Backend>
- QList<Qt3DCore::QNodeId> componentsUuid() const
+ QVector<Qt3DCore::QNodeId> componentsUuid() const
{
- return QList<Qt3DCore::QNodeId>();
+ return QVector<Qt3DCore::QNodeId>();
}
private:
@@ -169,9 +169,9 @@ private:
Qt3DCore::QNodeId m_transformComponent;
Qt3DCore::QNodeId m_materialComponent;
Qt3DCore::QNodeId m_cameraComponent;
- QList<Qt3DCore::QNodeId> m_layerComponents;
- QList<Qt3DCore::QNodeId> m_shaderDataComponents;
- QList<Qt3DCore::QNodeId> m_lightComponents;
+ QVector<Qt3DCore::QNodeId> m_layerComponents;
+ QVector<Qt3DCore::QNodeId> m_shaderDataComponents;
+ QVector<Qt3DCore::QNodeId> m_lightComponents;
Qt3DCore::QNodeId m_geometryRendererComponent;
Qt3DCore::QNodeId m_objectPickerComponent;
Qt3DCore::QNodeId m_boundingVolumeDebugComponent;
@@ -255,10 +255,10 @@ template<>
Q_AUTOTEST_EXPORT Qt3DCore::QNodeId Entity::componentUuid<Material>() const;
template<>
-Q_AUTOTEST_EXPORT QList<Qt3DCore::QNodeId> Entity::componentsUuid<Layer>() const;
+Q_AUTOTEST_EXPORT QVector<Qt3DCore::QNodeId> Entity::componentsUuid<Layer>() const;
template<>
-Q_AUTOTEST_EXPORT QList<Qt3DCore::QNodeId> Entity::componentsUuid<ShaderData>() const;
+Q_AUTOTEST_EXPORT QVector<Qt3DCore::QNodeId> Entity::componentsUuid<ShaderData>() const;
template<>
Q_AUTOTEST_EXPORT Qt3DCore::QNodeId Entity::componentUuid<GeometryRenderer>() const;
@@ -273,7 +273,7 @@ template<>
Q_AUTOTEST_EXPORT Qt3DCore::QNodeId Entity::componentUuid<ComputeJob>() const;
template<>
-Q_AUTOTEST_EXPORT QList<Qt3DCore::QNodeId> Entity::componentsUuid<Light>() const;
+Q_AUTOTEST_EXPORT QVector<Qt3DCore::QNodeId> Entity::componentsUuid<Light>() const;
class RenderEntityFunctor : public Qt3DCore::QBackendNodeMapper
{
diff --git a/src/render/backend/parameterpack.cpp b/src/render/backend/parameterpack.cpp
index c997c740e..b358a3139 100644
--- a/src/render/backend/parameterpack.cpp
+++ b/src/render/backend/parameterpack.cpp
@@ -69,7 +69,7 @@ void ParameterPack::removeParameter(Qt3DCore::QNodeId parameterId)
m_peers.removeOne(parameterId);
}
-QList<Qt3DCore::QNodeId> ParameterPack::parameters() const
+QVector<Qt3DCore::QNodeId> ParameterPack::parameters() const
{
return m_peers;
}
diff --git a/src/render/backend/parameterpack_p.h b/src/render/backend/parameterpack_p.h
index 31218e60d..da1ec6e44 100644
--- a/src/render/backend/parameterpack_p.h
+++ b/src/render/backend/parameterpack_p.h
@@ -68,10 +68,10 @@ public:
void clear();
void appendParameter(Qt3DCore::QNodeId parameterId);
void removeParameter(Qt3DCore::QNodeId parameterId);
- QList<Qt3DCore::QNodeId> parameters() const;
+ QVector<Qt3DCore::QNodeId> parameters() const;
private:
- QList<Qt3DCore::QNodeId> m_peers;
+ QVector<Qt3DCore::QNodeId> m_peers;
};
} // namespace Render
diff --git a/src/render/backend/rendertarget.cpp b/src/render/backend/rendertarget.cpp
index 0aa149eb1..57580bb7a 100644
--- a/src/render/backend/rendertarget.cpp
+++ b/src/render/backend/rendertarget.cpp
@@ -78,7 +78,7 @@ void RenderTarget::removeRenderAttachment(QNodeId attachmentId)
m_renderAttachments.removeOne(attachmentId);
}
-QList<Qt3DCore::QNodeId> RenderTarget::renderAttachments() const
+QVector<Qt3DCore::QNodeId> RenderTarget::renderAttachments() const
{
return m_renderAttachments;
}
diff --git a/src/render/backend/rendertarget_p.h b/src/render/backend/rendertarget_p.h
index ad178e2a0..abf2ca075 100644
--- a/src/render/backend/rendertarget_p.h
+++ b/src/render/backend/rendertarget_p.h
@@ -76,12 +76,12 @@ public:
void appendRenderAttachment(Qt3DCore::QNodeId attachmentId);
void removeRenderAttachment(Qt3DCore::QNodeId attachmentId);
- QList<Qt3DCore::QNodeId> renderAttachments() const;
+ QVector<Qt3DCore::QNodeId> renderAttachments() const;
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
private:
- QList<Qt3DCore::QNodeId> m_renderAttachments;
+ QVector<Qt3DCore::QNodeId> m_renderAttachments;
};
} // namespace Render
diff --git a/src/render/backend/renderview_p.h b/src/render/backend/renderview_p.h
index 32ba72d4b..5b2d56763 100644
--- a/src/render/backend/renderview_p.h
+++ b/src/render/backend/renderview_p.h
@@ -236,7 +236,7 @@ public:
void setRenderTargetHandle(HTarget renderTargetHandle) Q_DECL_NOEXCEPT { m_renderTarget = renderTargetHandle; }
HTarget renderTargetHandle() const Q_DECL_NOEXCEPT { return m_renderTarget; }
- void addSortCriteria(const QList<Qt3DCore::QNodeId> &sortMethodUid) { m_data->m_sortingCriteria.append(sortMethodUid); }
+ void addSortCriteria(const QVector<Qt3DCore::QNodeId> &sortMethodUid) { m_data->m_sortingCriteria.append(sortMethodUid); }
void setSurface(QSurface *surface) { m_surface = surface; }
QSurface *surface() const { return m_surface; }
@@ -259,7 +259,7 @@ public:
QMatrix4x4 *m_viewProjectionMatrix;
QStringList m_layers; // Only for debug
QVector<int> m_layerIds;
- QList<Qt3DCore::QNodeId> m_sortingCriteria;
+ QVector<Qt3DCore::QNodeId> m_sortingCriteria;
QVector3D m_eyePos;
UniformBlockValueBuilder m_uniformBlockBuilder;
};
diff --git a/src/render/framegraph/framegraphnode.cpp b/src/render/framegraph/framegraphnode.cpp
index 1f53fbe33..e6553c4a5 100644
--- a/src/render/framegraph/framegraphnode.cpp
+++ b/src/render/framegraph/framegraphnode.cpp
@@ -114,7 +114,7 @@ Qt3DCore::QNodeId FrameGraphNode::parentId() const
return m_parentId;
}
-QList<Qt3DCore::QNodeId> FrameGraphNode::childrenIds() const
+QVector<Qt3DCore::QNodeId> FrameGraphNode::childrenIds() const
{
return m_childrenIds;
}
diff --git a/src/render/framegraph/framegraphnode_p.h b/src/render/framegraph/framegraphnode_p.h
index 77ceb1a5a..d22977acb 100644
--- a/src/render/framegraph/framegraphnode_p.h
+++ b/src/render/framegraph/framegraphnode_p.h
@@ -104,7 +104,7 @@ public:
void removeChildId(Qt3DCore::QNodeId childHandle);
Qt3DCore::QNodeId parentId() const;
- QList<Qt3DCore::QNodeId> childrenIds() const;
+ QVector<Qt3DCore::QNodeId> childrenIds() const;
FrameGraphNode *parent() const;
QList<FrameGraphNode *> children() const;
@@ -116,7 +116,7 @@ private:
FrameGraphNodeType m_nodeType;
bool m_enabled;
Qt3DCore::QNodeId m_parentId;
- QList<Qt3DCore::QNodeId> m_childrenIds;
+ QVector<Qt3DCore::QNodeId> m_childrenIds;
FrameGraphManager *m_manager;
friend class FrameGraphVisitor;
diff --git a/src/render/framegraph/renderpassfilternode.cpp b/src/render/framegraph/renderpassfilternode.cpp
index eede0e7d7..e497ebd9c 100644
--- a/src/render/framegraph/renderpassfilternode.cpp
+++ b/src/render/framegraph/renderpassfilternode.cpp
@@ -67,7 +67,7 @@ void RenderPassFilter::updateFromPeer(Qt3DCore::QNode *peer)
m_parameterPack.appendParameter(p->id());
}
-QList<Qt3DCore::QNodeId> RenderPassFilter::filters() const
+QVector<Qt3DCore::QNodeId> RenderPassFilter::filters() const
{
return m_filters;
}
@@ -83,7 +83,7 @@ void RenderPassFilter::removeFilter(Qt3DCore::QNodeId criterionId)
m_filters.removeOne(criterionId);
}
-QList<Qt3DCore::QNodeId> RenderPassFilter::parameters() const
+QVector<Qt3DCore::QNodeId> RenderPassFilter::parameters() const
{
return m_parameterPack.parameters();
}
diff --git a/src/render/framegraph/renderpassfilternode_p.h b/src/render/framegraph/renderpassfilternode_p.h
index 762b3e756..19c53424f 100644
--- a/src/render/framegraph/renderpassfilternode_p.h
+++ b/src/render/framegraph/renderpassfilternode_p.h
@@ -74,14 +74,14 @@ public:
RenderPassFilter();
void updateFromPeer(Qt3DCore::QNode *peer) Q_DECL_OVERRIDE;
- QList<Qt3DCore::QNodeId> filters() const;
- QList<Qt3DCore::QNodeId> parameters() const;
+ QVector<Qt3DCore::QNodeId> filters() const;
+ QVector<Qt3DCore::QNodeId> parameters() const;
void appendFilter(Qt3DCore::QNodeId criterionId);
void removeFilter(Qt3DCore::QNodeId criterionId);
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
private:
- QList<Qt3DCore::QNodeId> m_filters;
+ QVector<Qt3DCore::QNodeId> m_filters;
ParameterPack m_parameterPack;
};
diff --git a/src/render/framegraph/sortmethod.cpp b/src/render/framegraph/sortmethod.cpp
index 7209b2e93..76496e2c5 100644
--- a/src/render/framegraph/sortmethod.cpp
+++ b/src/render/framegraph/sortmethod.cpp
@@ -79,7 +79,7 @@ void SortMethod::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
markDirty(AbstractRenderer::AllDirty);
}
-QList<QNodeId> SortMethod::criteria() const
+QVector<QNodeId> SortMethod::criteria() const
{
return m_criteria;
}
diff --git a/src/render/framegraph/sortmethod_p.h b/src/render/framegraph/sortmethod_p.h
index a78685199..44d59f1d7 100644
--- a/src/render/framegraph/sortmethod_p.h
+++ b/src/render/framegraph/sortmethod_p.h
@@ -68,10 +68,10 @@ public:
void updateFromPeer(Qt3DCore::QNode *peer) Q_DECL_OVERRIDE;
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
- QList<Qt3DCore::QNodeId> criteria() const;
+ QVector<Qt3DCore::QNodeId> criteria() const;
private:
- QList<Qt3DCore::QNodeId> m_criteria;
+ QVector<Qt3DCore::QNodeId> m_criteria;
};
} // namespace Render
diff --git a/src/render/framegraph/techniquefilternode.cpp b/src/render/framegraph/techniquefilternode.cpp
index 4acbde6fc..c1c836178 100644
--- a/src/render/framegraph/techniquefilternode.cpp
+++ b/src/render/framegraph/techniquefilternode.cpp
@@ -68,12 +68,12 @@ void TechniqueFilter::updateFromPeer(Qt3DCore::QNode *peer)
setEnabled(filter->isEnabled());
}
-QList<Qt3DCore::QNodeId> TechniqueFilter::parameters() const
+QVector<Qt3DCore::QNodeId> TechniqueFilter::parameters() const
{
return m_parameterPack.parameters();
}
-QList<Qt3DCore::QNodeId> TechniqueFilter::filters() const
+QVector<Qt3DCore::QNodeId> TechniqueFilter::filters() const
{
return m_filters;
}
diff --git a/src/render/framegraph/techniquefilternode_p.h b/src/render/framegraph/techniquefilternode_p.h
index e88762e3d..cc16cae91 100644
--- a/src/render/framegraph/techniquefilternode_p.h
+++ b/src/render/framegraph/techniquefilternode_p.h
@@ -77,16 +77,16 @@ public:
TechniqueFilter();
void updateFromPeer(Qt3DCore::QNode *peer) Q_DECL_OVERRIDE;
- QList<Qt3DCore::QNodeId> parameters() const;
+ QVector<Qt3DCore::QNodeId> parameters() const;
- QList<Qt3DCore::QNodeId> filters() const;
+ QVector<Qt3DCore::QNodeId> filters() const;
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
private:
void appendFilter(Qt3DCore::QNodeId criterionId);
void removeFilter(Qt3DCore::QNodeId criterionId);
- QList<Qt3DCore::QNodeId> m_filters;
+ QVector<Qt3DCore::QNodeId> m_filters;
ParameterPack m_parameterPack;
};
diff --git a/src/render/io/qsceneloader.cpp b/src/render/io/qsceneloader.cpp
index 4abbebadf..e5262d7d8 100644
--- a/src/render/io/qsceneloader.cpp
+++ b/src/render/io/qsceneloader.cpp
@@ -72,7 +72,7 @@ void QSceneLoader::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)
QNodePtr nodePtr = e->value().value<QNodePtr>();
QEntity *scene = static_cast<QEntity *>(nodePtr.data());
if (scene != Q_NULLPTR && d->m_scene != Q_NULLPTR) {
- QList<QNodeId> entities = d->m_scene->entitiesForComponent(d->m_id);
+ QVector<QNodeId> entities = d->m_scene->entitiesForComponent(d->m_id);
if (entities.size() > 1) // TO DO: QComponent shareable property
qCWarning(Render::Frontend) << "It is strongly discouraged to share SceneLoader component between entities";
Q_FOREACH (QNodeId id, entities) {
diff --git a/src/render/jobs/renderviewjobutils.cpp b/src/render/jobs/renderviewjobutils.cpp
index 315f0bcfd..8de844d30 100644
--- a/src/render/jobs/renderviewjobutils.cpp
+++ b/src/render/jobs/renderviewjobutils.cpp
@@ -365,7 +365,7 @@ ParameterInfoList::const_iterator findParamInfo(ParameterInfoList *params, const
}
void addParametersForIds(ParameterInfoList *params, ParameterManager *manager,
- const QList<Qt3DCore::QNodeId> &parameterIds)
+ const QVector<Qt3DCore::QNodeId> &parameterIds)
{
Q_FOREACH (const QNodeId paramId, parameterIds) {
Parameter *param = manager->lookupResource(paramId);
diff --git a/src/render/jobs/renderviewjobutils_p.h b/src/render/jobs/renderviewjobutils_p.h
index f2477998c..c93059459 100644
--- a/src/render/jobs/renderviewjobutils_p.h
+++ b/src/render/jobs/renderviewjobutils_p.h
@@ -133,7 +133,7 @@ Q_AUTOTEST_EXPORT void parametersFromMaterialEffectTechnique(ParameterInfoList *
Technique *technique);
Q_AUTOTEST_EXPORT void addParametersForIds(ParameterInfoList *params, ParameterManager *manager,
- const QList<Qt3DCore::QNodeId> &parameterIds);
+ const QVector<Qt3DCore::QNodeId> &parameterIds);
template<class T>
void parametersFromParametersProvider(ParameterInfoList *infoList,
diff --git a/src/render/materialsystem/effect.cpp b/src/render/materialsystem/effect.cpp
index 2e3ad3e02..184766422 100644
--- a/src/render/materialsystem/effect.cpp
+++ b/src/render/materialsystem/effect.cpp
@@ -114,12 +114,12 @@ void Effect::appendRenderTechnique(Qt3DCore::QNodeId technique)
m_techniques.append(technique);
}
-QList<Qt3DCore::QNodeId> Effect::techniques() const
+QVector<Qt3DCore::QNodeId> Effect::techniques() const
{
return m_techniques;
}
-QList<Qt3DCore::QNodeId> Effect::parameters() const
+QVector<Qt3DCore::QNodeId> Effect::parameters() const
{
return m_parameterPack.parameters();
}
diff --git a/src/render/materialsystem/effect_p.h b/src/render/materialsystem/effect_p.h
index 1593a83c9..a0da793ff 100644
--- a/src/render/materialsystem/effect_p.h
+++ b/src/render/materialsystem/effect_p.h
@@ -75,11 +75,11 @@ public:
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
void appendRenderTechnique(Qt3DCore::QNodeId t);
- QList<Qt3DCore::QNodeId> techniques() const;
- QList<Qt3DCore::QNodeId> parameters() const;
+ QVector<Qt3DCore::QNodeId> techniques() const;
+ QVector<Qt3DCore::QNodeId> parameters() const;
private:
- QList<Qt3DCore::QNodeId> m_techniques;
+ QVector<Qt3DCore::QNodeId> m_techniques;
ParameterPack m_parameterPack;
};
diff --git a/src/render/materialsystem/material.cpp b/src/render/materialsystem/material.cpp
index ca111e012..66dc373a3 100644
--- a/src/render/materialsystem/material.cpp
+++ b/src/render/materialsystem/material.cpp
@@ -116,7 +116,7 @@ void Material::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
markDirty(AbstractRenderer::AllDirty);
}
-QList<Qt3DCore::QNodeId> Material::parameters() const
+QVector<Qt3DCore::QNodeId> Material::parameters() const
{
return m_parameterPack.parameters();
}
diff --git a/src/render/materialsystem/material_p.h b/src/render/materialsystem/material_p.h
index 08736ef23..0b91db7b0 100644
--- a/src/render/materialsystem/material_p.h
+++ b/src/render/materialsystem/material_p.h
@@ -83,7 +83,7 @@ public:
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
inline bool isEnabled() const { return m_enabled; }
- QList<Qt3DCore::QNodeId> parameters() const;
+ QVector<Qt3DCore::QNodeId> parameters() const;
Qt3DCore::QNodeId effect() const;
private:
diff --git a/src/render/materialsystem/renderpass.cpp b/src/render/materialsystem/renderpass.cpp
index ae3022a1c..4a585f2cc 100644
--- a/src/render/materialsystem/renderpass.cpp
+++ b/src/render/materialsystem/renderpass.cpp
@@ -130,12 +130,12 @@ Qt3DCore::QNodeId RenderPass::shaderProgram() const
return m_shaderUuid;
}
-QList<Qt3DCore::QNodeId> RenderPass::annotations() const
+QVector<Qt3DCore::QNodeId> RenderPass::annotations() const
{
return m_annotationList;
}
-QList<Qt3DCore::QNodeId> RenderPass::parameters() const
+QVector<Qt3DCore::QNodeId> RenderPass::parameters() const
{
return m_parameterPack.parameters();
}
diff --git a/src/render/materialsystem/renderpass_p.h b/src/render/materialsystem/renderpass_p.h
index bdd3ab6a4..001bc744f 100644
--- a/src/render/materialsystem/renderpass_p.h
+++ b/src/render/materialsystem/renderpass_p.h
@@ -85,15 +85,15 @@ public:
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
Qt3DCore::QNodeId shaderProgram() const;
- QList<Qt3DCore::QNodeId> annotations() const;
- QList<Qt3DCore::QNodeId> parameters() const;
+ QVector<Qt3DCore::QNodeId> annotations() const;
+ QVector<Qt3DCore::QNodeId> parameters() const;
private:
void appendAnnotation(Qt3DCore::QNodeId criterionId);
void removeAnnotation(Qt3DCore::QNodeId criterionId);
Qt3DCore::QNodeId m_shaderUuid;
- QList<Qt3DCore::QNodeId> m_annotationList;
+ QVector<Qt3DCore::QNodeId> m_annotationList;
ParameterPack m_parameterPack;
};
diff --git a/src/render/materialsystem/shaderdata.cpp b/src/render/materialsystem/shaderdata.cpp
index 5c6a50156..1af45b81d 100644
--- a/src/render/materialsystem/shaderdata.cpp
+++ b/src/render/materialsystem/shaderdata.cpp
@@ -63,7 +63,7 @@ const int qNodeIdTypeId = qMetaTypeId<Qt3DCore::QNodeId>();
}
-QList<Qt3DCore::QNodeId> ShaderData::m_updatedShaderData;
+QVector<Qt3DCore::QNodeId> ShaderData::m_updatedShaderData;
ShaderData::ShaderData()
: m_managers(Q_NULLPTR)
@@ -253,7 +253,7 @@ void ShaderData::readPeerProperties(QShaderData *shaderData)
m_properties.insert(propertyName, propertyValue);
m_originalProperties.insert(propertyName, propertyValue);
- // We check if the property is a QNodeId or QList<QNodeId> so that we can
+ // We check if the property is a QNodeId or QVector<QNodeId> so that we can
// check nested QShaderData for update
if (propertyValue.userType() == qNodeIdTypeId) {
m_nestedShaderDataProperties.insert(propertyName, propertyValue);
diff --git a/src/render/materialsystem/shaderdata_p.h b/src/render/materialsystem/shaderdata_p.h
index aff28fc2c..d0f19d40d 100644
--- a/src/render/materialsystem/shaderdata_p.h
+++ b/src/render/materialsystem/shaderdata_p.h
@@ -104,7 +104,7 @@ protected:
QHash<QString, QVariant> m_nestedShaderDataProperties;
QHash<QString, QShaderData::TransformType> m_transformedProperties;
QMutex m_mutex;
- static QList<Qt3DCore::QNodeId> m_updatedShaderData;
+ static QVector<Qt3DCore::QNodeId> m_updatedShaderData;
QMatrix4x4 m_worldMatrix;
QMatrix4x4 m_viewMatrix;
NodeManagers *m_managers;
diff --git a/src/render/materialsystem/technique.cpp b/src/render/materialsystem/technique.cpp
index 895175752..2ee0f6274 100644
--- a/src/render/materialsystem/technique.cpp
+++ b/src/render/materialsystem/technique.cpp
@@ -152,7 +152,7 @@ void Technique::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
markDirty(AbstractRenderer::AllDirty);
}
-QList<Qt3DCore::QNodeId> Technique::parameters() const
+QVector<Qt3DCore::QNodeId> Technique::parameters() const
{
return m_parameterPack.parameters();
}
@@ -168,12 +168,12 @@ void Technique::removeRenderPass(Qt3DCore::QNodeId renderPassId)
m_renderPasses.removeOne(renderPassId);
}
-QList<Qt3DCore::QNodeId> Technique::annotations() const
+QVector<Qt3DCore::QNodeId> Technique::annotations() const
{
return m_annotationList;
}
-QList<Qt3DCore::QNodeId> Technique::renderPasses() const
+QVector<Qt3DCore::QNodeId> Technique::renderPasses() const
{
return m_renderPasses;
}
diff --git a/src/render/materialsystem/technique_p.h b/src/render/materialsystem/technique_p.h
index 277dbdf7b..f0c09711a 100644
--- a/src/render/materialsystem/technique_p.h
+++ b/src/render/materialsystem/technique_p.h
@@ -82,7 +82,7 @@ public:
void updateFromPeer(Qt3DCore::QNode *peer) Q_DECL_OVERRIDE;
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
- QList<Qt3DCore::QNodeId> parameters() const;
+ QVector<Qt3DCore::QNodeId> parameters() const;
void appendRenderPass(Qt3DCore::QNodeId renderPassId);
void removeRenderPass(Qt3DCore::QNodeId renderPassId);
@@ -90,16 +90,16 @@ public:
void appendAnnotation(Qt3DCore::QNodeId criterionId);
void removeAnnotation(Qt3DCore::QNodeId criterionId);
- QList<Qt3DCore::QNodeId> annotations() const;
- QList<Qt3DCore::QNodeId> renderPasses() const;
+ QVector<Qt3DCore::QNodeId> annotations() const;
+ QVector<Qt3DCore::QNodeId> renderPasses() const;
QGraphicsApiFilter *graphicsApiFilter() const;
private:
QGraphicsApiFilter *m_graphicsApiFilter;
ParameterPack m_parameterPack;
- QList<Qt3DCore::QNodeId> m_annotationList;
- QList<Qt3DCore::QNodeId> m_renderPasses;
+ QVector<Qt3DCore::QNodeId> m_annotationList;
+ QVector<Qt3DCore::QNodeId> m_renderPasses;
};
} // namespace Render
diff --git a/src/render/texture/textureimage_p.h b/src/render/texture/textureimage_p.h
index 53986d68d..a2cb28ddc 100644
--- a/src/render/texture/textureimage_p.h
+++ b/src/render/texture/textureimage_p.h
@@ -108,7 +108,7 @@ private:
TextureManager *m_textureManager;
TextureImageManager *m_textureImageManager;
TextureDataManager *m_textureDataManager;
- QList<Qt3DCore::QNodeId> m_referencedTextures;
+ QVector<Qt3DCore::QNodeId> m_referencedTextures;
HTexture m_textureProvider;
Qt3DCore::QNodeId m_textureProviderId;
TextureImageDNA m_dna;
diff --git a/tests/auto/core/cloning/tst_cloning.cpp b/tests/auto/core/cloning/tst_cloning.cpp
index 90f2217c5..749027d71 100644
--- a/tests/auto/core/cloning/tst_cloning.cpp
+++ b/tests/auto/core/cloning/tst_cloning.cpp
@@ -131,7 +131,7 @@ void tst_Cloning::checkEntityCloning()
QCOMPARE(cloneEntity->children().count(), 4);
QCOMPARE(cloneEntity->components().count(), 3);
- QList<Qt3DCore::QNodeId> ids = QList<Qt3DCore::QNodeId>() << comp1->id() << comp2->id() << comp3->id() << childNode->id();
+ QVector<Qt3DCore::QNodeId> ids = QVector<Qt3DCore::QNodeId>() << comp1->id() << comp2->id() << comp3->id() << childNode->id();
Q_FOREACH (QObject *c, cloneEntity->children()) {
Qt3DCore::QNode *n = qobject_cast<Qt3DCore::QNode *>(c);
diff --git a/tests/auto/core/qscene/tst_qscene.cpp b/tests/auto/core/qscene/tst_qscene.cpp
index fad7891dc..2983159f8 100644
--- a/tests/auto/core/qscene/tst_qscene.cpp
+++ b/tests/auto/core/qscene/tst_qscene.cpp
@@ -357,7 +357,7 @@ void tst_QScene::addEntityForComponent()
// THEN
for (int i = 0; i < 10; i++) {
- QList<Qt3DCore::QNodeId> ids = scene->entitiesForComponent(components.at(i)->id());
+ QVector<Qt3DCore::QNodeId> ids = scene->entitiesForComponent(components.at(i)->id());
QCOMPARE(ids.count(), 10);
}
}
diff --git a/tests/auto/render/entity/tst_entity.cpp b/tests/auto/render/entity/tst_entity.cpp
index 2ec160eed..241c4e448 100644
--- a/tests/auto/render/entity/tst_entity.cpp
+++ b/tests/auto/render/entity/tst_entity.cpp
@@ -45,7 +45,7 @@
#include "testrenderer.h"
typedef Qt3DCore::QNodeId (*UuidMethod)(Qt3DRender::Render::Entity *);
-typedef QList<Qt3DCore::QNodeId> (*UuidListMethod)(Qt3DRender::Render::Entity *);
+typedef QVector<Qt3DCore::QNodeId> (*UuidListMethod)(Qt3DRender::Render::Entity *);
using namespace Qt3DCore;
using namespace Qt3DRender;
@@ -62,8 +62,8 @@ QNodeId objectPickerUuid(Entity *entity) { return entity->componentUuid<ObjectPi
QNodeId boundingVolumeDebugUuid(Entity *entity) { return entity->componentUuid<BoundingVolumeDebug>(); }
QNodeId computeJobUuid(Entity *entity) { return entity->componentUuid<ComputeJob>(); }
-QList<QNodeId> layersUuid(Entity *entity) { return entity->componentsUuid<Layer>(); }
-QList<QNodeId> shadersUuid(Entity *entity) { return entity->componentsUuid<ShaderData>(); }
+QVector<QNodeId> layersUuid(Entity *entity) { return entity->componentsUuid<Layer>(); }
+QVector<QNodeId> shadersUuid(Entity *entity) { return entity->componentsUuid<ShaderData>(); }
class tst_RenderEntity : public QObject
{