summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2009-05-04 11:43:57 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2009-05-04 11:54:08 (GMT)
commitd77e368795cf27131cdb625800c6d654aef6dd4e (patch)
treeba547590d58d5d82bc34b1bb5845f5c9106b38f5 /src
parent2283c848fe8bf2704c6c35ee7985657bd521dee9 (diff)
downloadQt-d77e368795cf27131cdb625800c6d654aef6dd4e.zip
Qt-d77e368795cf27131cdb625800c6d654aef6dd4e.tar.gz
Qt-d77e368795cf27131cdb625800c6d654aef6dd4e.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmldom.cpp10
1 files 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();
}