diff options
Diffstat (limited to 'src/declarative/qml/qmldom.cpp')
-rw-r--r-- | src/declarative/qml/qmldom.cpp | 16 |
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(); } |