summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-05-18 06:19:13 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-05-20 05:55:10 +0000
commitbfae282e8fb6d6d83e92df712f93b583616169d9 (patch)
tree3c29f6ac29f3a679b6f02b632212384bf4df1018 /src/core
parent5e28b995f5e43c6a908906966190f4ad594edede (diff)
Do not pass `this` to Private c-tor
For classes derived from QNodePrivate, it is not used anymore. Change-Id: I9573042500c2c7533687d251e72bac14cb793525 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core-components/qcamera.cpp6
-rw-r--r--src/core/core-components/qcamera_p.h2
-rw-r--r--src/core/core-components/qcameralens.cpp6
-rw-r--r--src/core/core-components/qcameralens_p.h2
-rw-r--r--src/core/nodes/qcomponent.cpp6
-rw-r--r--src/core/nodes/qcomponent_p.h2
-rw-r--r--src/core/nodes/qentity.cpp7
-rw-r--r--src/core/nodes/qentity_p.h2
-rw-r--r--src/core/nodes/qnode.cpp3
-rw-r--r--src/core/nodes/qnode_p.h2
-rw-r--r--src/core/transforms/qtransform.cpp10
-rw-r--r--src/core/transforms/qtransform_p.h2
12 files changed, 24 insertions, 26 deletions
diff --git a/src/core/core-components/qcamera.cpp b/src/core/core-components/qcamera.cpp
index 2737daaa0..76d208cc9 100644
--- a/src/core/core-components/qcamera.cpp
+++ b/src/core/core-components/qcamera.cpp
@@ -45,8 +45,8 @@ namespace Qt3D {
\class Qt3D::QCameraPrivate
\internal
*/
-QCameraPrivate::QCameraPrivate(QCamera *qq)
- : QEntityPrivate(qq)
+QCameraPrivate::QCameraPrivate()
+ : QEntityPrivate()
, m_lens(new QCameraLens())
, m_transform(new QTransform())
, m_lookAt(new QLookAtTransform())
@@ -62,7 +62,7 @@ QCameraPrivate::QCameraPrivate(QCamera *qq)
*/
QCamera::QCamera(QNode *parent) :
- QEntity(*new QCameraPrivate(this), parent)
+ QEntity(*new QCameraPrivate, parent)
{
QObject::connect(d_func()->m_lens, SIGNAL(projectionTypeChanged()), this, SIGNAL(projectionMatrixChanged()));
QObject::connect(d_func()->m_lens, SIGNAL(nearPlaneChanged()), this, SIGNAL(nearPlaneChanged()));
diff --git a/src/core/core-components/qcamera_p.h b/src/core/core-components/qcamera_p.h
index e0b4c332d..1b6e5a85c 100644
--- a/src/core/core-components/qcamera_p.h
+++ b/src/core/core-components/qcamera_p.h
@@ -49,7 +49,7 @@ namespace Qt3D {
class QT3DCORESHARED_EXPORT QCameraPrivate : public QEntityPrivate
{
public:
- QCameraPrivate(QCamera *qq);
+ QCameraPrivate();
Q_DECLARE_PUBLIC(QCamera)
diff --git a/src/core/core-components/qcameralens.cpp b/src/core/core-components/qcameralens.cpp
index 23449d6cb..5fc43e5c3 100644
--- a/src/core/core-components/qcameralens.cpp
+++ b/src/core/core-components/qcameralens.cpp
@@ -45,8 +45,8 @@ namespace Qt3D {
\class Qt3D::QCameraLensPrivate
\internal
*/
-QCameraLensPrivate::QCameraLensPrivate(QCameraLens *qq)
- : QComponentPrivate(qq)
+QCameraLensPrivate::QCameraLensPrivate()
+ : QComponentPrivate()
, m_projectionType(QCameraLens::OrthogonalProjection)
, m_nearPlane(0.1f)
, m_farPlane(1024.0f)
@@ -60,7 +60,7 @@ QCameraLensPrivate::QCameraLensPrivate(QCameraLens *qq)
}
QCameraLens::QCameraLens(QNode *parent)
- : QComponent(*new QCameraLensPrivate(this), parent)
+ : QComponent(*new QCameraLensPrivate, parent)
{
Q_D(QCameraLens);
d->updateProjectionMatrix();
diff --git a/src/core/core-components/qcameralens_p.h b/src/core/core-components/qcameralens_p.h
index 10d1aaf8e..ec3b43c63 100644
--- a/src/core/core-components/qcameralens_p.h
+++ b/src/core/core-components/qcameralens_p.h
@@ -51,7 +51,7 @@ namespace Qt3D {
class QT3DCORESHARED_EXPORT QCameraLensPrivate : public QComponentPrivate
{
public:
- QCameraLensPrivate(QCameraLens *qq);
+ QCameraLensPrivate();
inline void updateProjectionMatrix()
{
diff --git a/src/core/nodes/qcomponent.cpp b/src/core/nodes/qcomponent.cpp
index 52fa77905..43ebfa768 100644
--- a/src/core/nodes/qcomponent.cpp
+++ b/src/core/nodes/qcomponent.cpp
@@ -49,8 +49,8 @@ namespace Qt3D {
\class Qt3D::QComponentPrivate
\internal
*/
-QComponentPrivate::QComponentPrivate(QComponent *qq)
- : QNodePrivate(qq)
+QComponentPrivate::QComponentPrivate()
+ : QNodePrivate()
, m_shareable(true)
, m_enabled(true)
{
@@ -110,7 +110,7 @@ void QComponentPrivate::removeEntity(QEntity *entity)
instance one of the subclasses instead.
*/
QComponent::QComponent(QNode *parent)
- : QNode(*new QComponentPrivate(this), parent)
+ : QNode(*new QComponentPrivate, parent)
{
}
diff --git a/src/core/nodes/qcomponent_p.h b/src/core/nodes/qcomponent_p.h
index 473d17d39..cc4849375 100644
--- a/src/core/nodes/qcomponent_p.h
+++ b/src/core/nodes/qcomponent_p.h
@@ -47,7 +47,7 @@ namespace Qt3D {
class QT3DCORESHARED_EXPORT QComponentPrivate : public QNodePrivate
{
public:
- explicit QComponentPrivate(QComponent *qq);
+ QComponentPrivate();
void addEntity(QEntity *entity);
void removeEntity(QEntity *entity);
diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp
index 8564317a3..e0aff9466 100644
--- a/src/core/nodes/qentity.cpp
+++ b/src/core/nodes/qentity.cpp
@@ -55,9 +55,8 @@ namespace Qt3D {
\class Qt3D::QEntityPrivate
\internal
*/
-
-QEntityPrivate::QEntityPrivate(QEntity *qq)
- : QNodePrivate(qq)
+QEntityPrivate::QEntityPrivate()
+ : QNodePrivate()
, m_enabled(true)
{}
@@ -84,7 +83,7 @@ QEntityPrivate::QEntityPrivate(QEntity *qq)
Constructs a new Qt3D::QEntity instance with \a parent as parent.
*/
QEntity::QEntity(QNode *parent)
- : QNode(*new QEntityPrivate(this), parent)
+ : QNode(*new QEntityPrivate, parent)
{
}
diff --git a/src/core/nodes/qentity_p.h b/src/core/nodes/qentity_p.h
index 1b70a9ed5..b28d0c391 100644
--- a/src/core/nodes/qentity_p.h
+++ b/src/core/nodes/qentity_p.h
@@ -48,7 +48,7 @@ namespace Qt3D {
class QT3DCORESHARED_EXPORT QEntityPrivate : public QNodePrivate
{
public :
- QEntityPrivate(QEntity *qq);
+ QEntityPrivate();
Q_DECLARE_PUBLIC(QEntity)
diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp
index 53b1e8f77..d6472cfd6 100644
--- a/src/core/nodes/qnode.cpp
+++ b/src/core/nodes/qnode.cpp
@@ -58,7 +58,7 @@ QHash<QNodeId, QNode *> QNodePrivate::m_clonesLookupTable = QHash<QNodeId, QNode
\class Qt3D::QNodePrivate
\internal
*/
-QNodePrivate::QNodePrivate(QNode *qq)
+QNodePrivate::QNodePrivate()
: QObjectPrivate()
, m_changeArbiter(Q_NULLPTR)
, m_scene(Q_NULLPTR)
@@ -67,7 +67,6 @@ QNodePrivate::QNodePrivate(QNode *qq)
, m_propertyChangesSetup(false)
, m_signals(this)
{
- Q_UNUSED(qq) // ###
}
// Called by QEvent::childAdded (main thread)
diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h
index 34b413029..7e654bf7a 100644
--- a/src/core/nodes/qnode_p.h
+++ b/src/core/nodes/qnode_p.h
@@ -54,7 +54,7 @@ class QAspectEngine;
class QT3DCORESHARED_EXPORT QNodePrivate : public QObjectPrivate, public QObservableInterface
{
public:
- QNodePrivate(QNode *qq = Q_NULLPTR);
+ QNodePrivate();
void setScene(QSceneInterface *scene);
QSceneInterface *scene() const;
diff --git a/src/core/transforms/qtransform.cpp b/src/core/transforms/qtransform.cpp
index 3e5a84b55..f9700b60f 100644
--- a/src/core/transforms/qtransform.cpp
+++ b/src/core/transforms/qtransform.cpp
@@ -48,8 +48,8 @@ namespace Qt3D {
\class Qt3D::QTransformPrivate
\internal
*/
-QTransformPrivate::QTransformPrivate(QTransform *qq)
- : QComponentPrivate(qq),
+QTransformPrivate::QTransformPrivate()
+ : QComponentPrivate(),
m_transformsDirty(false)
{
}
@@ -80,19 +80,19 @@ QMatrix4x4 QTransformPrivate::applyTransforms() const
QTransform::QTransform(QNode *parent)
- : Qt3D::QComponent(*new QTransformPrivate(this), parent)
+ : QComponent(*new QTransformPrivate, parent)
{
}
QTransform::QTransform(QList<QAbstractTransform *> transforms, QNode *parent)
- : Qt3D::QComponent(*new QTransformPrivate(this), parent)
+ : QComponent(*new QTransformPrivate, parent)
{
Q_FOREACH (QAbstractTransform *t, transforms)
addTransform(t);
}
QTransform::QTransform(QAbstractTransform *transform, QNode *parent)
- : Qt3D::QComponent(*new QTransformPrivate(this), parent)
+ : QComponent(*new QTransformPrivate, parent)
{
addTransform(transform);
}
diff --git a/src/core/transforms/qtransform_p.h b/src/core/transforms/qtransform_p.h
index ef2e86b1b..4c2f95d20 100644
--- a/src/core/transforms/qtransform_p.h
+++ b/src/core/transforms/qtransform_p.h
@@ -49,7 +49,7 @@ class QTransformPrivate : public QComponentPrivate
Q_DECLARE_PUBLIC(QTransform)
public:
- QTransformPrivate(QTransform *qq);
+ QTransformPrivate();
void _q_transformDestroyed(QObject *obj);
void _q_update();