aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgnode.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2013-04-16 11:25:14 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-16 15:33:17 +0200
commita6ccf8b484596091b9a38ac37dac43c456cdc730 (patch)
tree6948e87eb8711878d6230b015a23611cbe9904a5 /src/quick/scenegraph/coreapi/qsgnode.h
parent3dbbcc09e98d768a5b7b6c0a498f8aefd9e25b9e (diff)
Make QSGNode and friends extensible via a d-pointer
Convert the private void *m_reserved to a d_ptr so as to make QSGNode inherited classes extensible without breaking binary compatibility. QSGNode and subclasses do not create a private instance by default. This is required by a follow-up commit where a new member needs to be added to QSGSimpleTextureNode. Protected ctors have been added to the superclasses of QSGSimpleTextureNode in the usual fashion. Change-Id: I30c5f5d057654145d87f18c34c5d13a6ff5f7b11 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgnode.h')
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h
index 3fa2f7fc04..d83e6bcc81 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.h
+++ b/src/quick/scenegraph/coreapi/qsgnode.h
@@ -58,6 +58,9 @@ class QSGRootNode;
class QSGGeometryNode;
class QSGTransformNode;
class QSGClipNode;
+class QSGNodePrivate;
+class QSGBasicGeometryNodePrivate;
+class QSGGeometryNodePrivate;
class Q_QUICK_EXPORT QSGNode
{
@@ -149,6 +152,7 @@ public:
protected:
QSGNode(NodeType type);
+ QSGNode(QSGNodePrivate &dd, NodeType type);
private:
friend class QSGRootNode;
@@ -167,7 +171,8 @@ private:
Flags m_nodeFlags;
DirtyState m_dirtyState;
- void *m_reserved;
+protected:
+ QScopedPointer<QSGNodePrivate> d_ptr;
};
class Q_QUICK_EXPORT QSGBasicGeometryNode : public QSGNode
@@ -184,6 +189,7 @@ public:
protected:
QSGBasicGeometryNode(NodeType type);
+ QSGBasicGeometryNode(QSGBasicGeometryNodePrivate &dd, NodeType type);
private:
friend class QSGNodeUpdater;
@@ -218,6 +224,9 @@ public:
void setInheritedOpacity(qreal opacity);
qreal inheritedOpacity() const { return m_opacity; }
+protected:
+ QSGGeometryNode(QSGGeometryNodePrivate &dd);
+
private:
friend class QSGNodeUpdater;