summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-08 15:56:06 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-09 12:23:57 +0200
commit39d0041f15601cee499c959702b004cbd721bed9 (patch)
tree95140b88dee61bd78d171cb958ceca0cca978ad1 /src/core
parent93bd28e6d4ac8fdb6b07b30684e6b17ee515e44e (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>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/aspects/aspectcommanddebugger_p.h2
-rw-r--r--src/core/aspects/qabstractaspect.cpp6
-rw-r--r--src/core/aspects/qabstractaspect_p.h8
-rw-r--r--src/core/aspects/qaspectengine_p.h2
-rw-r--r--src/core/aspects/qaspectmanager.cpp18
-rw-r--r--src/core/aspects/qaspectmanager_p.h16
-rw-r--r--src/core/geometry/qgeometry_p.h2
-rw-r--r--src/core/jobs/calcboundingvolumejob.cpp2
-rw-r--r--src/core/jobs/qaspectjobmanager.cpp4
-rw-r--r--src/core/jobs/qaspectjobmanager_p.h1
-rw-r--r--src/core/jobs/qaspectjobproviderinterface_p.h1
-rw-r--r--src/core/jobs/qthreadpooler.cpp8
-rw-r--r--src/core/jobs/qthreadpooler_p.h4
-rw-r--r--src/core/jobs/task_p.h2
-rw-r--r--src/core/nodes/propertychangehandler_p.h1
-rw-r--r--src/core/nodes/qabstractnodefactory.cpp4
-rw-r--r--src/core/nodes/qabstractnodefactory_p.h2
-rw-r--r--src/core/nodes/qcomponent_p.h2
-rw-r--r--src/core/nodes/qdestructionidandtypecollector_p.h4
-rw-r--r--src/core/nodes/qentity_p.h4
-rw-r--r--src/core/nodes/qnode_p.h4
-rw-r--r--src/core/qchangearbiter.cpp4
-rw-r--r--src/core/qchangearbiter_p.h10
-rw-r--r--src/core/qscene.cpp8
-rw-r--r--src/core/qscene_p.h4
-rw-r--r--src/core/qscheduler.cpp2
-rw-r--r--src/core/resources/qframeallocator_p.h1
-rw-r--r--src/core/resources/qframeallocator_p_p.h4
-rw-r--r--src/core/services/qdownloadnetworkworker_p.h2
-rw-r--r--src/core/services/qsysteminformationservice.cpp10
-rw-r--r--src/core/services/qsysteminformationservice_p_p.h6
-rw-r--r--src/core/transforms/qabstractskeleton_p.h4
-rw-r--r--src/core/transforms/qjoint_p.h2
-rw-r--r--src/core/transforms/sqt_p.h8
34 files changed, 79 insertions, 83 deletions
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