summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-04-09 16:37:40 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2009-04-24 07:52:33 (GMT)
commitb080c837c4c63b1cd0fdea9ae483cad824aef0d1 (patch)
treee29932e94667968fcf53152a6af3cd93f1bfd1f5
parentd4bc83a09d29a9f28f7d453eb9e0693225c3a32e (diff)
downloadQt-b080c837c4c63b1cd0fdea9ae483cad824aef0d1.zip
Qt-b080c837c4c63b1cd0fdea9ae483cad824aef0d1.tar.gz
Qt-b080c837c4c63b1cd0fdea9ae483cad824aef0d1.tar.bz2
Enable the "old" XML parser when the qgetenv("QML_XML") is not empty.
-rw-r--r--src/declarative/qml/qmldom.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp
index 0fe9111..54cc2e4 100644
--- a/src/declarative/qml/qmldom.cpp
+++ b/src/declarative/qml/qmldom.cpp
@@ -152,16 +152,6 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data)
{
d->error = QString();
-#ifdef QML_WITH_XML_PARSER
- QmlXmlParser parser;
-#else
- QmlScriptParser parser;
-#endif
- if(!parser.parse(data)) {
- d->error = parser.errorDescription();
- return false;
- }
-
QmlCompiledComponent component;
QmlCompiler compiler;
// ###
@@ -172,9 +162,9 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data)
return false;
}
- if(parser.tree()) {
- component.dump(0, parser.tree());
- d->root = parser.tree();
+ if(tree) {
+ component.dump(0, tree);
+ d->root = tree;
d->root->addref();
}