diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/aspects/qaspectengine.cpp | 16 | ||||
-rw-r--r-- | src/core/aspects/qaspectengine.h | 6 | ||||
-rw-r--r-- | src/core/geometry/qgeometry.cpp | 2 | ||||
-rw-r--r-- | src/core/geometry/qgeometry.h | 2 | ||||
-rw-r--r-- | src/core/jobs/qaspectjob.h | 1 | ||||
-rw-r--r-- | src/core/nodes/qcomponent.cpp | 4 | ||||
-rw-r--r-- | src/core/nodes/qcomponent.h | 2 | ||||
-rw-r--r-- | src/core/nodes/qentity.cpp | 2 | ||||
-rw-r--r-- | src/core/nodes/qentity.h | 6 | ||||
-rw-r--r-- | src/core/nodes/qnode.cpp | 4 | ||||
-rw-r--r-- | src/core/nodes/qnode.h | 4 | ||||
-rw-r--r-- | src/core/nodes/qnodeid.h | 2 | ||||
-rw-r--r-- | src/core/qabstractfrontendnodemanager.cpp | 2 | ||||
-rw-r--r-- | src/core/qabstractfrontendnodemanager.h | 4 | ||||
-rw-r--r-- | src/core/transforms/qjoint.cpp | 2 | ||||
-rw-r--r-- | src/core/transforms/qjoint.h | 2 |
16 files changed, 30 insertions, 31 deletions
diff --git a/src/core/aspects/qaspectengine.cpp b/src/core/aspects/qaspectengine.cpp index 2adefbbb3..df352c38d 100644 --- a/src/core/aspects/qaspectengine.cpp +++ b/src/core/aspects/qaspectengine.cpp @@ -60,11 +60,11 @@ QT_BEGIN_NAMESPACE namespace{ -QVector<Qt3DCore::QNode *> getNodesForCreation(Qt3DCore::QNode *root) +QList<Qt3DCore::QNode *> getNodesForCreation(Qt3DCore::QNode *root) { using namespace Qt3DCore; - QVector<QNode *> nodes; + QList<QNode *> nodes; QNodeVisitor visitor; visitor.traverse(root, [&nodes](QNode *node) { nodes.append(node); @@ -84,11 +84,11 @@ QVector<Qt3DCore::QNode *> getNodesForCreation(Qt3DCore::QNode *root) return nodes; } -QVector<Qt3DCore::QNode *> getNodesForRemoval(Qt3DCore::QNode *root) +QList<Qt3DCore::QNode *> getNodesForRemoval(Qt3DCore::QNode *root) { using namespace Qt3DCore; - QVector<QNode *> nodes; + QList<QNode *> nodes; QNodeVisitor visitor; visitor.traverse(root, [&nodes](QNode *node) { nodes.append(node); @@ -373,7 +373,7 @@ void QAspectEngine::unregisterAspect(const QString &name) /*! * \return the aspects owned by the aspect engine. */ -QVector<QAbstractAspect *> QAspectEngine::aspects() const +QList<QAbstractAspect *> QAspectEngine::aspects() const { Q_D(const QAspectEngine); return d->m_aspects; @@ -444,10 +444,10 @@ QNode *QAspectEngine::lookupNode(QNodeId id) const return d->m_scene ? d->m_scene->lookupNode(id) : nullptr; } -QVector<QNode *> QAspectEngine::lookupNodes(const QVector<QNodeId> &ids) const +QList<QNode *> QAspectEngine::lookupNodes(const QList<QNodeId> &ids) const { Q_D(const QAspectEngine); - return d->m_scene ? d->m_scene->lookupNodes(ids) : QVector<QNode *>{}; + return d->m_scene ? d->m_scene->lookupNodes(ids) : QList<QNode *>{}; } /*! @@ -487,7 +487,7 @@ void QAspectEngine::setRootEntity(QEntityPtr root) // deregister the nodes from the scene d->initNodeTree(root.data()); - const QVector<QNode *> nodes = getNodesForCreation(root.data()); + const QList<QNode *> nodes = getNodesForCreation(root.data()); // Specify if the AspectManager should be driving the simulation loop or not d->m_aspectManager->setRunMode(d->m_runMode); diff --git a/src/core/aspects/qaspectengine.h b/src/core/aspects/qaspectengine.h index 04eede9d3..a6592cf34 100644 --- a/src/core/aspects/qaspectengine.h +++ b/src/core/aspects/qaspectengine.h @@ -43,8 +43,8 @@ #include <Qt3DCore/qt3dcore_global.h> #include <Qt3DCore/qabstractfrontendnodemanager.h> #include <Qt3DCore/qnodeid.h> +#include <QtCore/QList> #include <QtCore/QObject> -#include <QtCore/QVector> QT_BEGIN_NAMESPACE @@ -82,7 +82,7 @@ public: void unregisterAspect(QAbstractAspect *aspect); void unregisterAspect(const QString &name); - QVector<QAbstractAspect*> aspects() const; + QList<QAbstractAspect*> aspects() const; QAbstractAspect *aspect(const QString &name) const; QVariant executeCommand(const QString &command); @@ -90,7 +90,7 @@ public: void processFrame(); QNode *lookupNode(QNodeId id) const override; - QVector<QNode *> lookupNodes(const QVector<QNodeId> &ids) const override; + QList<QNode *> lookupNodes(const QList<QNodeId> &ids) const override; private: Q_DECLARE_PRIVATE(QAspectEngine) diff --git a/src/core/geometry/qgeometry.cpp b/src/core/geometry/qgeometry.cpp index 4e8dcacac..6b1af6804 100644 --- a/src/core/geometry/qgeometry.cpp +++ b/src/core/geometry/qgeometry.cpp @@ -279,7 +279,7 @@ QVector3D QGeometry::maxExtent() const /*! Returns the list of attributes in this geometry. */ -QVector<QAttribute *> QGeometry::attributes() const +QList<QAttribute *> QGeometry::attributes() const { Q_D(const QGeometry); return d->m_attributes; diff --git a/src/core/geometry/qgeometry.h b/src/core/geometry/qgeometry.h index 89b3c7019..8f21638b2 100644 --- a/src/core/geometry/qgeometry.h +++ b/src/core/geometry/qgeometry.h @@ -60,7 +60,7 @@ public: explicit QGeometry(Qt3DCore::QNode *parent = nullptr); ~QGeometry(); - QVector<QAttribute *> attributes() const; + QList<QAttribute *> attributes() const; Q_INVOKABLE void addAttribute(Qt3DCore::QAttribute *attribute); Q_INVOKABLE void removeAttribute(Qt3DCore::QAttribute *attribute); diff --git a/src/core/jobs/qaspectjob.h b/src/core/jobs/qaspectjob.h index 90070f5b7..a824c90cf 100644 --- a/src/core/jobs/qaspectjob.h +++ b/src/core/jobs/qaspectjob.h @@ -42,7 +42,6 @@ #include <Qt3DCore/qt3dcore_global.h> #include <QtCore/QSharedPointer> -#include <QtCore/QVector> QT_BEGIN_NAMESPACE diff --git a/src/core/nodes/qcomponent.cpp b/src/core/nodes/qcomponent.cpp index 79bba229d..5e41e2f67 100644 --- a/src/core/nodes/qcomponent.cpp +++ b/src/core/nodes/qcomponent.cpp @@ -158,9 +158,9 @@ void QComponent::setShareable(bool shareable) } /*! - Returns a QVector containing all the entities that reference this component. + Returns a QList containing all the entities that reference this component. */ -QVector<QEntity *> QComponent::entities() const +QList<QEntity *> QComponent::entities() const { Q_D(const QComponent); return d->m_entities; diff --git a/src/core/nodes/qcomponent.h b/src/core/nodes/qcomponent.h index f07b34c9f..3de755710 100644 --- a/src/core/nodes/qcomponent.h +++ b/src/core/nodes/qcomponent.h @@ -61,7 +61,7 @@ public: bool isShareable() const; - QVector<QEntity *> entities() const; + QList<QEntity *> entities() const; public Q_SLOTS: void setShareable(bool isShareable); diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp index 02f84b924..25ec4434c 100644 --- a/src/core/nodes/qentity.cpp +++ b/src/core/nodes/qentity.cpp @@ -119,7 +119,7 @@ namespace Qt3DCore { */ /*! - \fn template<typename T> QVector<T *> Qt3DCore::QEntity::componentsOfType() const + \fn template<typename T> QList<T *> Qt3DCore::QEntity::componentsOfType() const Returns all the components added to this entity that can be cast to type T or an empty vector if there are no such components. diff --git a/src/core/nodes/qentity.h b/src/core/nodes/qentity.h index ab87da4eb..6c9bec118 100644 --- a/src/core/nodes/qentity.h +++ b/src/core/nodes/qentity.h @@ -51,7 +51,7 @@ namespace Qt3DCore { class QComponent; class QEntityPrivate; -typedef QVector<QComponent*> QComponentVector; +using QComponentVector = QList<QComponent*>; class Q_3DCORESHARED_EXPORT QEntity : public QNode { @@ -63,9 +63,9 @@ public: QComponentVector components() const; template<class T> - QVector<T *> componentsOfType() const + QList<T *> componentsOfType() const { - QVector<T*> matchComponents; + QList<T*> matchComponents; const QComponentVector comps = this->components(); for (QComponent *component : comps) { T *typedComponent = qobject_cast<T*>(component); diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp index e9665874d..15a2f5978 100644 --- a/src/core/nodes/qnode.cpp +++ b/src/core/nodes/qnode.cpp @@ -383,7 +383,7 @@ void QNodePrivate::setSceneHelper(QNode *root) // We also need to handle QEntity <-> QComponent relationships if (QComponent *c = qobject_cast<QComponent *>(root)) { - const QVector<QEntity *> entities = c->entities(); + const QList<QEntity *> entities = c->entities(); for (QEntity *entity : entities) { if (!m_scene->hasEntityForComponent(c->id(), entity->id())) { if (!c->isShareable() && !m_scene->entitiesForComponent(c->id()).isEmpty()) @@ -406,7 +406,7 @@ void QNodePrivate::unsetSceneHelper(QNode *node) // We also need to handle QEntity <-> QComponent relationships removal if (QComponent *c = qobject_cast<QComponent *>(node)) { - const QVector<QEntity *> entities = c->entities(); + const QList<QEntity *> entities = c->entities(); for (QEntity *entity : entities) { if (nodePrivate->m_scene) nodePrivate->m_scene->removeEntityForComponent(c->id(), entity->id()); diff --git a/src/core/nodes/qnode.h b/src/core/nodes/qnode.h index 2fe0b0f9e..4c7f11d56 100644 --- a/src/core/nodes/qnode.h +++ b/src/core/nodes/qnode.h @@ -58,8 +58,8 @@ class QAspectEngine; class QBackendNodeTester; #endif -typedef QVector<QNode *> QNodeVector; -typedef QSharedPointer<QNode> QNodePtr; +using QNodeVector = QList<QNode *>; +using QNodePtr = QSharedPointer<QNode>; class Q_3DCORESHARED_EXPORT QNode : public QObject { diff --git a/src/core/nodes/qnodeid.h b/src/core/nodes/qnodeid.h index 18fb954ef..704fc6c76 100644 --- a/src/core/nodes/qnodeid.h +++ b/src/core/nodes/qnodeid.h @@ -100,7 +100,7 @@ private: }; QT3D_DECLARE_TYPEINFO(Qt3DCore, QNodeId, Q_PRIMITIVE_TYPE) -typedef QVector<QNodeId> QNodeIdVector; +using QNodeIdVector = QList<QNodeId>; #ifndef QT_NO_DEBUG_STREAM Q_3DCORESHARED_EXPORT QDebug operator<<(QDebug d, QNodeId id); diff --git a/src/core/qabstractfrontendnodemanager.cpp b/src/core/qabstractfrontendnodemanager.cpp index 9c8b8eceb..7b2ed5f3e 100644 --- a/src/core/qabstractfrontendnodemanager.cpp +++ b/src/core/qabstractfrontendnodemanager.cpp @@ -55,7 +55,7 @@ Returns the node instance matching the id, or nullptr if not found. */ /* -\fn QVector<QNode *> Qt3DCore::QAbstractFrontEndNodeManager::lookupNodes(const QVector<QNodeId> &ids) const +\fn QList<QNode *> Qt3DCore::QAbstractFrontEndNodeManager::lookupNodes(const QList<QNodeId> &ids) const Returns the vector of node instance matching the ids. diff --git a/src/core/qabstractfrontendnodemanager.h b/src/core/qabstractfrontendnodemanager.h index 4b47e7761..3a42f05e1 100644 --- a/src/core/qabstractfrontendnodemanager.h +++ b/src/core/qabstractfrontendnodemanager.h @@ -43,7 +43,7 @@ #include <Qt3DCore/qt3dcore_global.h> #include <Qt3DCore/qnodeid.h> -#include <QtCore/qvector.h> +#include <QtCore/qlist.h> QT_BEGIN_NAMESPACE @@ -67,7 +67,7 @@ public: virtual ~QAbstractFrontEndNodeManager(); virtual QNode *lookupNode(QNodeId id) const = 0; - virtual QVector<QNode *> lookupNodes(const QVector<QNodeId> &ids) const = 0; + virtual QList<QNode *> lookupNodes(const QList<QNodeId> &ids) const = 0; protected: QAbstractFrontEndNodeManager(); diff --git a/src/core/transforms/qjoint.cpp b/src/core/transforms/qjoint.cpp index de7d913e3..1c0233f49 100644 --- a/src/core/transforms/qjoint.cpp +++ b/src/core/transforms/qjoint.cpp @@ -373,7 +373,7 @@ void QJoint::removeChildJoint(QJoint *joint) /*! The vector of joints this joint has as children. */ -QVector<QJoint *> QJoint::childJoints() const +QList<QJoint *> QJoint::childJoints() const { Q_D(const QJoint); return d->m_childJoints; diff --git a/src/core/transforms/qjoint.h b/src/core/transforms/qjoint.h index 1bd404a1a..851673a59 100644 --- a/src/core/transforms/qjoint.h +++ b/src/core/transforms/qjoint.h @@ -80,7 +80,7 @@ public: void addChildJoint(QJoint *joint); void removeChildJoint(QJoint *joint); - QVector<QJoint *> childJoints() const; + QList<QJoint *> childJoints() const; public Q_SLOTS: void setScale(const QVector3D &scale); |