From c081d9e75093213873b9f824d284b8d4e934c6d1 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 3 Jul 2014 10:24:12 +0200 Subject: Enable QSG_RUNTIME_DESCRIPTION by default for debug builds. This can be quite helpful when doing scene graph debugging with QSG_RENDERER_DEBUG=dump or using qDebug() on nodes in general. Change-Id: I6328d3f2a0fad87161c386bed14408598c986dcb Reviewed-by: Robin Burchell --- src/quick/scenegraph/coreapi/qsgnode.cpp | 7 +++++-- src/quick/scenegraph/coreapi/qsgnode.h | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp index b0a4f20149..04ea8afddf 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.cpp +++ b/src/quick/scenegraph/coreapi/qsgnode.cpp @@ -668,12 +668,15 @@ void QSGNode::markDirty(DirtyState bits) } } -#ifdef QSG_RUNTIME_DESCRIPTION void qsgnode_set_description(QSGNode *node, const QString &description) { +#ifdef QSG_RUNTIME_DESCRIPTION QSGNodePrivate::setDescription(node, description); -} +#else + Q_UNUSED(node); + Q_UNUSED(description); #endif +} /*! \class QSGBasicGeometryNode diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h index f85184db90..380b7e01e1 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.h +++ b/src/quick/scenegraph/coreapi/qsgnode.h @@ -49,7 +49,9 @@ QT_BEGIN_NAMESPACE -// #define QSG_RUNTIME_DESCRIPTION +#ifndef QT_NO_DEBUG +#define QSG_RUNTIME_DESCRIPTION +#endif class QSGRenderer; @@ -183,9 +185,7 @@ protected: QScopedPointer d_ptr; }; -#ifdef QSG_RUNTIME_DESCRIPTION void Q_QUICK_EXPORT qsgnode_set_description(QSGNode *node, const QString &description); -#endif class Q_QUICK_EXPORT QSGBasicGeometryNode : public QSGNode { -- cgit v1.2.3