summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-07-09 07:00:07 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-07-09 07:00:07 (GMT)
commit888f57107e698731c4a1dd2c46745c6293b2222e (patch)
tree86e479a7e00c037561defc87f89ba800b11c607a /src/declarative/util
parent1b4c6795c628d4d76ff846977fdc4396ad5d9bda (diff)
downloadQt-888f57107e698731c4a1dd2c46745c6293b2222e.zip
Qt-888f57107e698731c4a1dd2c46745c6293b2222e.tar.gz
Qt-888f57107e698731c4a1dd2c46745c6293b2222e.tar.bz2
Allow relative URLs
Diffstat (limited to 'src/declarative/util')
-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 ab095b1..f8cbf96 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());