summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlscript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qmlscript.cpp')
-rw-r--r--src/declarative/util/qmlscript.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/declarative/util/qmlscript.cpp b/src/declarative/util/qmlscript.cpp
index 07cc1d5..8d03804 100644
--- a/src/declarative/util/qmlscript.cpp
+++ b/src/declarative/util/qmlscript.cpp
@@ -148,9 +148,8 @@ void QmlScript::setSource(const QUrl &source)
Q_D(QmlScript);
if (d->url == source)
return;
- d->url = source;
- Q_ASSERT(!source.isRelative());
-
+ d->url = qmlContext(this)->resolvedUrl(source);
+
#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
if (d->url.scheme() == QLatin1String("file")) {
QFile file(d->url.toLocalFile());