summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@kdab.com>2015-12-15 16:48:51 +0100
committerKevin Ottens <kevin.ottens@kdab.com>2015-12-18 15:55:39 +0000
commit985d8b47a62c7c21a7fd65f9ffe813ec3d6e13ad (patch)
tree48c41ba8749a1c0edf635dfc316d465af6d3216a /src/core
parented910f364c0730cf2c16c1f59516115761cf8720 (diff)
Make parentEntityId private
It is used only once in the whole of Qt3D and looks rather foreign to the rest of the nodes API. Change-Id: I6d8d40590a1f8a5c2019a8d16a7abff4f19ae9bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nodes/qentity.cpp12
-rw-r--r--src/core/nodes/qentity.h1
-rw-r--r--src/core/nodes/qentity_p.h2
3 files changed, 8 insertions, 7 deletions
diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp
index ad1a574fb..7bca65917 100644
--- a/src/core/nodes/qentity.cpp
+++ b/src/core/nodes/qentity.cpp
@@ -111,7 +111,7 @@ void QEntity::copy(const QNode *ref)
QNode::copy(ref);
const QEntity *entity = static_cast<const QEntity*>(ref);
d_func()->m_visible = entity->d_func()->m_visible;
- d_func()->m_parentEntityId = entity->parentEntityId();
+ d_func()->m_parentEntityId = entity->d_func()->parentEntityId();
Q_FOREACH (QComponent *c, entity->d_func()->m_components) {
QNode *ccclone = QNode::clone(c);
@@ -228,12 +228,12 @@ QEntity *QEntity::parentEntity() const
there is no Qt3DCore::QEntity parent of the current Qt3DCore::QEntity in the scene
hierarchy.
*/
-QNodeId QEntity::parentEntityId() const
+QNodeId QEntityPrivate::parentEntityId() const
{
- Q_D(const QEntity);
- if (d->m_parentEntityId.isNull())
- parentEntity();
- return d->m_parentEntityId;
+ Q_Q(const QEntity);
+ if (m_parentEntityId.isNull())
+ q->parentEntity();
+ return m_parentEntityId;
}
} // namespace Qt3DCore
diff --git a/src/core/nodes/qentity.h b/src/core/nodes/qentity.h
index 36ffb2a6e..be25eff8d 100644
--- a/src/core/nodes/qentity.h
+++ b/src/core/nodes/qentity.h
@@ -65,7 +65,6 @@ public:
void removeAllComponents();
QEntity *parentEntity() const;
- QNodeId parentEntityId() const;
protected:
QEntity(QEntityPrivate &dd, QNode *parent = 0);
diff --git a/src/core/nodes/qentity_p.h b/src/core/nodes/qentity_p.h
index 3b3216798..8ae219a68 100644
--- a/src/core/nodes/qentity_p.h
+++ b/src/core/nodes/qentity_p.h
@@ -63,6 +63,8 @@ public :
Q_DECLARE_PUBLIC(QEntity)
+ QNodeId parentEntityId() const;
+
QComponentList m_components;
bool m_visible;