diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-08-02 21:04:44 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-12 10:46:41 +0200 |
commit | 57a70efe4c54bbfc8109933503c45cc43127c6ad (patch) | |
tree | e53457212e4abd004e377c5bc9c54047a77c1d17 /src/quick/items | |
parent | f56b68b61c8ae021526c2d433961323b7e41032c (diff) |
Support opt-in QSGNode descriptions without breaking binary compat.
This define is quite useful for debugging scene graph internals, but
it is disabled by default to conserve memory.
For clarity, I renamed the define to QSG_RUNTIME_DESCRIPTION.
Change-Id: Ie5ff44d67af38adc65d0d09255d8533dc7a33bff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquickitem_p.h | 8 | ||||
-rw-r--r-- | src/quick/items/qquickshadereffectnode.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquicktextnode.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 0ffc092a83..fe70b38ed1 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -867,9 +867,9 @@ QSGTransformNode *QQuickItemPrivate::itemNode() if (!itemNodeInstance) { itemNodeInstance = createTransformNode(); itemNodeInstance->setFlag(QSGNode::OwnedByParent, false); -#ifdef QML_RUNTIME_TESTING +#ifdef QSG_RUNTIME_DESCRIPTION Q_Q(QQuickItem); - itemNodeInstance->description = QString::fromLatin1("QQuickItem(%1)").arg(QString::fromLatin1(q->metaObject()->className())); + qsgnode_set_description(itemNodeInstance, QString::fromLatin1("QQuickItem(%1)").arg(QString::fromLatin1(q->metaObject()->className()))); #endif } return itemNodeInstance; @@ -887,8 +887,8 @@ QSGNode *QQuickItemPrivate::childContainerNode() opacityNode()->appendChildNode(groupNode); else itemNode()->appendChildNode(groupNode); -#ifdef QML_RUNTIME_TESTING - groupNode->description = QLatin1String("group"); +#ifdef QSG_RUNTIME_DESCRIPTION + qsgnode_set_description(groupNode, QLatin1String("group")); #endif } return groupNode; diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp index 17c5e4c31b..d2a6184087 100644 --- a/src/quick/items/qquickshadereffectnode.cpp +++ b/src/quick/items/qquickshadereffectnode.cpp @@ -390,8 +390,8 @@ QQuickShaderEffectNode::QQuickShaderEffectNode() { QSGNode::setFlag(UsePreprocess, true); -#ifdef QML_RUNTIME_TESTING - description = QLatin1String("shadereffect"); +#ifdef QSG_RUNTIME_DESCRIPTION + qsgnode_set_description(this, QLatin1String("shadereffect")); #endif } diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp index d8040a1110..d3a566f336 100644 --- a/src/quick/items/qquicktextnode.cpp +++ b/src/quick/items/qquicktextnode.cpp @@ -83,8 +83,8 @@ namespace { QQuickTextNode::QQuickTextNode(QSGContext *context, QQuickItem *ownerElement) : m_context(context), m_cursorNode(0), m_ownerElement(ownerElement), m_useNativeRenderer(false) { -#if defined(QML_RUNTIME_TESTING) - description = QLatin1String("text"); +#ifdef QSG_RUNTIME_DESCRIPTION + qsgnode_set_description(this, QLatin1String("text")); #endif } |