summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmldom.cpp5
-rw-r--r--src/declarative/qml/qmldom.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp
index 689446b..a31be81 100644
--- a/src/declarative/qml/qmldom.cpp
+++ b/src/declarative/qml/qmldom.cpp
@@ -149,16 +149,15 @@ int QmlDomDocument::version() const
\sa QmlDomDocument::save() QmlDomDocument::loadError()
*/
-bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data)
+bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data, const QUrl &url)
{
Q_UNUSED(engine);
-
d->errors.clear();
QmlCompiledComponent component;
QmlCompiler compiler;
- QmlCompositeTypeData *td = ((QmlEnginePrivate *)QmlEnginePrivate::get(engine))->typeManager.getImmediate(data, QUrl());;
+ QmlCompositeTypeData *td = ((QmlEnginePrivate *)QmlEnginePrivate::get(engine))->typeManager.getImmediate(data, url);;
if(td->status == QmlCompositeTypeData::Error) {
d->errors = td->errors;
diff --git a/src/declarative/qml/qmldom.h b/src/declarative/qml/qmldom.h
index daca888..f90fb08 100644
--- a/src/declarative/qml/qmldom.h
+++ b/src/declarative/qml/qmldom.h
@@ -73,7 +73,7 @@ public:
int version() const;
QList<QmlError> errors() const;
- bool load(QmlEngine *, const QByteArray &);
+ bool load(QmlEngine *, const QByteArray &, const QUrl & = QUrl());
QByteArray save() const;
QmlDomObject rootObject() const;