aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-07-03 10:24:12 +0200
committerGunnar Sletta <gunnar.sletta@jollamobile.com>2014-07-03 14:58:15 +0200
commitc081d9e75093213873b9f824d284b8d4e934c6d1 (patch)
tree750921ab54b331425f8b1ea04954c120c759c933 /src/quick
parent0ad363e4ebef07a41ea2d2c8fb592e3e199ae5f6 (diff)
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 <robin+qt@viroteck.net>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.cpp7
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h6
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<QSGNodePrivate> 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
{