aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgnode.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgnode.h')
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h45
1 files changed, 20 insertions, 25 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h
index f2708b2b96..854e284c9e 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.h
+++ b/src/quick/scenegraph/coreapi/qsgnode.h
@@ -77,9 +77,7 @@ public:
TransformNodeType,
ClipNodeType,
OpacityNodeType,
-#ifndef qdoc
RootNodeType,
-#endif
RenderNodeType
};
@@ -96,9 +94,8 @@ public:
OwnsOpaqueMaterial = 0x00040000,
// Uppermost 8 bits are reserved for internal use.
-#ifndef qdoc
IsVisitableNode = 0x01000000
-#else
+#ifdef Q_CLANG_QDOC
InternalReserved = 0x01000000
#endif
};
@@ -113,7 +110,6 @@ public:
DirtyMaterial = 0x2000,
DirtyOpacity = 0x4000,
-#ifndef qdoc
DirtyForceUpdate = 0x8000,
DirtyUsePreprocess = UsePreprocess,
@@ -122,7 +118,6 @@ public:
| DirtyNodeAdded
| DirtyOpacity
| DirtyForceUpdate
-#endif
};
Q_DECLARE_FLAGS(DirtyState, DirtyStateBit)
@@ -173,13 +168,13 @@ private:
void init();
void destroy();
- QSGNode *m_parent;
- NodeType m_type;
- QSGNode *m_firstChild;
- QSGNode *m_lastChild;
- QSGNode *m_nextSibling;
- QSGNode *m_previousSibling;
- int m_subtreeRenderableCount;
+ QSGNode *m_parent = nullptr;
+ NodeType m_type = BasicNodeType;
+ QSGNode *m_firstChild = nullptr;
+ QSGNode *m_lastChild = nullptr;
+ QSGNode *m_nextSibling = nullptr;
+ QSGNode *m_previousSibling = nullptr;
+ int m_subtreeRenderableCount = 0;
Flags m_nodeFlags;
DirtyState m_dirtyState; // Obsolete, remove in Qt 6
@@ -195,7 +190,7 @@ void Q_QUICK_EXPORT qsgnode_set_description(QSGNode *node, const QString &descri
class Q_QUICK_EXPORT QSGBasicGeometryNode : public QSGNode
{
public:
- ~QSGBasicGeometryNode();
+ ~QSGBasicGeometryNode() override;
void setGeometry(QSGGeometry *geometry);
const QSGGeometry *geometry() const { return m_geometry; }
@@ -229,7 +224,7 @@ class Q_QUICK_EXPORT QSGGeometryNode : public QSGBasicGeometryNode
{
public:
QSGGeometryNode();
- ~QSGGeometryNode();
+ ~QSGGeometryNode() override;
void setMaterial(QSGMaterial *material);
QSGMaterial *material() const { return m_material; }
@@ -251,18 +246,18 @@ protected:
private:
friend class QSGNodeUpdater;
- int m_render_order;
- QSGMaterial *m_material;
- QSGMaterial *m_opaque_material;
+ int m_render_order = 0;
+ QSGMaterial *m_material = nullptr;
+ QSGMaterial *m_opaque_material = nullptr;
- qreal m_opacity;
+ qreal m_opacity = 1;
};
class Q_QUICK_EXPORT QSGClipNode : public QSGBasicGeometryNode
{
public:
QSGClipNode();
- ~QSGClipNode();
+ ~QSGClipNode() override;
void setIsRectangular(bool rectHint);
bool isRectangular() const { return m_is_rectangular; }
@@ -282,7 +277,7 @@ class Q_QUICK_EXPORT QSGTransformNode : public QSGNode
{
public:
QSGTransformNode();
- ~QSGTransformNode();
+ ~QSGTransformNode() override;
void setMatrix(const QMatrix4x4 &matrix);
const QMatrix4x4 &matrix() const { return m_matrix; }
@@ -300,7 +295,7 @@ class Q_QUICK_EXPORT QSGRootNode : public QSGNode
{
public:
QSGRootNode();
- ~QSGRootNode();
+ ~QSGRootNode() override;
private:
void notifyNodeChange(QSGNode *node, DirtyState state);
@@ -317,7 +312,7 @@ class Q_QUICK_EXPORT QSGOpacityNode : public QSGNode
{
public:
QSGOpacityNode();
- ~QSGOpacityNode();
+ ~QSGOpacityNode() override;
void setOpacity(qreal opacity);
qreal opacity() const { return m_opacity; }
@@ -328,8 +323,8 @@ public:
bool isSubtreeBlocked() const override;
private:
- qreal m_opacity;
- qreal m_combined_opacity;
+ qreal m_opacity = 1;
+ qreal m_combined_opacity = 1;
};
class Q_QUICK_EXPORT QSGNodeVisitor {