summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-02-22 19:55:50 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-02-22 21:17:48 +0000
commit672d101cf445bc90fc565c10d469f288e543ad00 (patch)
tree754ceb14d162d79abfc6e3e2d4968987206e3d7b
parent082c247cf859a145847ffe440b2e16994e0bf71a (diff)
QNodeList -> QNodeVector
Change-Id: Ib968afbdfa95c6210c1a05b3e92e48f64a842799 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--examples/qt3d/assimp-cpp/main.cpp2
-rw-r--r--src/core/nodes/qnode.cpp6
-rw-r--r--src/core/nodes/qnode.h4
-rw-r--r--src/core/nodes/qnodevisitor.cpp4
-rw-r--r--src/core/nodes/qnodevisitor_p.h10
5 files changed, 13 insertions, 13 deletions
diff --git a/examples/qt3d/assimp-cpp/main.cpp b/examples/qt3d/assimp-cpp/main.cpp
index 067023e36..88d5cf644 100644
--- a/examples/qt3d/assimp-cpp/main.cpp
+++ b/examples/qt3d/assimp-cpp/main.cpp
@@ -102,7 +102,7 @@ void SceneWalker::onStatusChanged()
void SceneWalker::walkEntity(Qt3DCore::QEntity *e, int depth)
{
- Qt3DCore::QNodeList nodes = e->childNodes();
+ Qt3DCore::QNodeVector nodes = e->childNodes();
for (int i = 0; i < nodes.count(); ++i) {
Qt3DCore::QNode *node = nodes[i];
Qt3DCore::QEntity *entity = qobject_cast<Qt3DCore::QEntity *>(node);
diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp
index f463502a9..d2ee7c4a2 100644
--- a/src/core/nodes/qnode.cpp
+++ b/src/core/nodes/qnode.cpp
@@ -541,7 +541,7 @@ void QNode::setParent(QNode *parent)
A shared pointer for QNode.
*/
/*!
- \typedef Qt3DCore::QNodeList
+ \typedef Qt3DCore::QNodeVector
\relates Qt3DCore::QNode
List of QNode pointers.
@@ -551,9 +551,9 @@ void QNode::setParent(QNode *parent)
* Returns a list filled with the QNode children of the current
* QNode instance.
*/
-QNodeList QNode::childNodes() const
+QNodeVector QNode::childNodes() const
{
- QNodeList nodeChildrenList;
+ QNodeVector nodeChildrenList;
const QObjectList objectChildrenList = QObject::children();
nodeChildrenList.reserve(objectChildrenList.size());
diff --git a/src/core/nodes/qnode.h b/src/core/nodes/qnode.h
index f4a7b75f9..d07cc336b 100644
--- a/src/core/nodes/qnode.h
+++ b/src/core/nodes/qnode.h
@@ -57,7 +57,7 @@ class QNodePrivate;
class QEntity;
class QAspectEngine;
-typedef QList<QNode *> QNodeList;
+typedef QVector<QNode *> QNodeVector;
typedef QSharedPointer<QNode> QNodePtr;
#define QT3DCORE_QUOTE(str) #str
@@ -88,7 +88,7 @@ public:
bool notificationsBlocked() const;
bool blockNotifications(bool block);
- QNodeList childNodes() const;
+ QNodeVector childNodes() const;
bool isEnabled() const;
diff --git a/src/core/nodes/qnodevisitor.cpp b/src/core/nodes/qnodevisitor.cpp
index 050e49292..c60456230 100644
--- a/src/core/nodes/qnodevisitor.cpp
+++ b/src/core/nodes/qnodevisitor.cpp
@@ -61,12 +61,12 @@ QNode* QNodeVisitor::currentNode() const
return m_path.back();
}
-void QNodeVisitor::setPath(QNodeList path)
+void QNodeVisitor::setPath(QNodeVector path)
{
m_path = path;
}
-QNodeList QNodeVisitor::path() const
+QNodeVector QNodeVisitor::path() const
{
return m_path;
}
diff --git a/src/core/nodes/qnodevisitor_p.h b/src/core/nodes/qnodevisitor_p.h
index b844db589..416e87cd7 100644
--- a/src/core/nodes/qnodevisitor_p.h
+++ b/src/core/nodes/qnodevisitor_p.h
@@ -92,18 +92,18 @@ public:
QNode *rootNode() const;
QNode *currentNode() const;
- void setPath(QNodeList path);
- QNodeList path() const;
+ void setPath(QNodeVector path);
+ QNodeVector path() const;
void append(QNode *n);
void pop_back();
private:
- QNodeList m_path;
+ QNodeVector m_path;
template<typename NodeVisitorFunctor>
void startTraversing(QNode *rootNode_, NodeVisitorFunctor fN)
{
- setPath(QNodeList() << rootNode_);
+ setPath(QNodeVector() << rootNode_);
if (rootNode_)
visitNode(rootNode_, fN);
}
@@ -111,7 +111,7 @@ private:
template<typename NodeVisitorFunctor, typename EntityVisitorFunctor>
void startTraversing(QNode *rootNode_, NodeVisitorFunctor fN, EntityVisitorFunctor fE)
{
- setPath(QNodeList() << rootNode_);
+ setPath(QNodeVector() << rootNode_);
QEntity* rootEntity = qobject_cast<QEntity *>(rootNode_);
if (rootEntity)