From d77e368795cf27131cdb625800c6d654aef6dd4e Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 4 May 2009 13:43:57 +0200 Subject: Fix QmlDom breakage Two actual copies of QmlScriptParser & the parse tree were instantiated in QmlDocument::load, with the result that the additions that the compiler stored in the one parse tree were not seen by the Dom classes, using the other one. Reviewed-by: erikv --- src/declarative/qml/qmldom.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index cf0a2fb..f8cf194 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -154,12 +154,6 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) d->error = QString(); - QmlScriptParser parser; - if (!parser.parse(data)) { - d->error = parser.errorDescription(); - return false; - } - QmlCompiledComponent component; QmlCompiler compiler; @@ -184,8 +178,8 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) } if (td->data.tree()) { - component.dump(0, parser.tree()); - d->root = parser.tree(); + component.dump(0, td->data.tree()); + d->root = td->data.tree(); d->root->addref(); } -- cgit v0.12