summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmldom.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2009-05-25 13:43:44 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2009-05-25 13:43:44 (GMT)
commit2024a49b576bd39e17f995b980c1f66c5cb08175 (patch)
tree1c7ea82c53580f1348b3240b9abbdfda9b74bfa9 /src/declarative/qml/qmldom.cpp
parent9d10060e152582b473aa531e36afe60b71d8c5c5 (diff)
downloadQt-2024a49b576bd39e17f995b980c1f66c5cb08175.zip
Qt-2024a49b576bd39e17f995b980c1f66c5cb08175.tar.gz
Qt-2024a49b576bd39e17f995b980c1f66c5cb08175.tar.bz2
Disable QmlDom debug output by default
Only print AST if QML_COMPILER_DUMP is set
Diffstat (limited to 'src/declarative/qml/qmldom.cpp')
-rw-r--r--src/declarative/qml/qmldom.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp
index 9871fcb..b689ec5 100644
--- a/src/declarative/qml/qmldom.cpp
+++ b/src/declarative/qml/qmldom.cpp
@@ -44,13 +44,15 @@
#include "private/qmlcompiler_p.h"
#include "private/qmlengine_p.h"
#include "qmlcompiledcomponent_p.h"
-#include <QtCore/qbytearray.h>
-#include <QtCore/qstring.h>
-
+#include <QtCore/QByteArray>
+#include <QtCore/QDebug>
+#include <QtCore/QString>
#include "qmlscriptparser_p.h"
QT_BEGIN_NAMESPACE
+DEFINE_BOOL_CONFIG_OPTION(compilerDump, QML_COMPILER_DUMP)
+
QmlDomDocumentPrivate::QmlDomDocumentPrivate()
: root(0)
{
@@ -193,7 +195,11 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data, const QUrl
}
if (td->data.tree()) {
- td->data.tree()->dump();
+ if (compilerDump()) {
+ qWarning() << "-AST------------------------------------------------------------------------------";
+ td->data.tree()->dump();
+ qWarning() << "----------------------------------------------------------------------------------";
+ }
d->root = td->data.tree();
d->root->addref();
}