From: Gunnar Sletta Date: Sat, 3 Sep 2011 05:49:07 +0000 (+0200) Subject: move QSGNodeUpdater into private header where it belongs X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=f696ddad0eaab53104f2f2ed85979ecd2c1a9259;p=konrad%2Fqtdeclarative.git move QSGNodeUpdater into private header where it belongs Change-Id: I5cb12cac3d49cfd9b1682b405e65b2cdea4eb57d Reviewed-on: http://codereview.qt.nokia.com/4306 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- diff --git a/src/declarative/scenegraph/coreapi/qsgnode.cpp b/src/declarative/scenegraph/coreapi/qsgnode.cpp index 65b4bf9..fac44da 100644 --- a/src/declarative/scenegraph/coreapi/qsgnode.cpp +++ b/src/declarative/scenegraph/coreapi/qsgnode.cpp @@ -1247,35 +1247,6 @@ QDebug operator<<(QDebug d, const QSGNode *n) return d; } - -/*! - \class QSGNodeDumper - \brief The QSGNodeDumper class provides a way of dumping a scene grahp to the console. - - This class is solely for debugging purposes. - - \internal - */ - -void QSGNodeDumper::dump(QSGNode *n) -{ - QSGNodeDumper dump; - dump.visitNode(n); -} - -void QSGNodeDumper::visitNode(QSGNode *n) -{ - qDebug() << QString(m_indent * 2, QLatin1Char(' ')) << n; - QSGNodeVisitor::visitNode(n); -} - -void QSGNodeDumper::visitChildren(QSGNode *n) -{ - ++m_indent; - QSGNodeVisitor::visitChildren(n); - --m_indent; -} - #endif QT_END_NAMESPACE diff --git a/src/declarative/scenegraph/coreapi/qsgnode.h b/src/declarative/scenegraph/coreapi/qsgnode.h index 95c89b9..c4f4674 100644 --- a/src/declarative/scenegraph/coreapi/qsgnode.h +++ b/src/declarative/scenegraph/coreapi/qsgnode.h @@ -339,19 +339,6 @@ Q_DECLARATIVE_EXPORT QDebug operator<<(QDebug, const QSGTransformNode *n); Q_DECLARATIVE_EXPORT QDebug operator<<(QDebug, const QSGOpacityNode *n); Q_DECLARATIVE_EXPORT QDebug operator<<(QDebug, const QSGRootNode *n); -class QSGNodeDumper : public QSGNodeVisitor { - -public: - static void dump(QSGNode *n); - - QSGNodeDumper() : m_indent(0) {} - void visitNode(QSGNode *n); - void visitChildren(QSGNode *n); - -private: - int m_indent; -}; - #endif QT_END_NAMESPACE diff --git a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp index 57a3059..e8e6760 100644 --- a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp @@ -698,6 +698,33 @@ void QSGRenderer::draw(const QSGMaterialShader *shader, const QSGGeometry *g) } +/*! + \class QSGNodeDumper + \brief The QSGNodeDumper class provides a way of dumping a scene grahp to the console. + + This class is solely for debugging purposes. + + \internal + */ + +void QSGNodeDumper::dump(QSGNode *n) +{ + QSGNodeDumper dump; + dump.visitNode(n); +} + +void QSGNodeDumper::visitNode(QSGNode *n) +{ + qDebug() << QString(m_indent * 2, QLatin1Char(' ')) << n; + QSGNodeVisitor::visitNode(n); +} + +void QSGNodeDumper::visitChildren(QSGNode *n) +{ + ++m_indent; + QSGNodeVisitor::visitChildren(n); + --m_indent; +} QT_END_NAMESPACE diff --git a/src/declarative/scenegraph/coreapi/qsgrenderer_p.h b/src/declarative/scenegraph/coreapi/qsgrenderer_p.h index eed6483..05fb9b4 100644 --- a/src/declarative/scenegraph/coreapi/qsgrenderer_p.h +++ b/src/declarative/scenegraph/coreapi/qsgrenderer_p.h @@ -212,6 +212,21 @@ QSGMaterialShader::RenderState QSGRenderer::state(QSGMaterialShader::RenderState } +class Q_DECLARATIVE_EXPORT QSGNodeDumper : public QSGNodeVisitor { + +public: + static void dump(QSGNode *n); + + QSGNodeDumper() : m_indent(0) {} + void visitNode(QSGNode *n); + void visitChildren(QSGNode *n); + +private: + int m_indent; +}; + + + QT_END_NAMESPACE QT_END_HEADER