summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcontext.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-08-26 00:34:09 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-08-26 00:34:09 (GMT)
commit642440f41c5cd4b5f0ee66101b3ca32859293d29 (patch)
tree07c0bbd15d4961d8f62759ca819c92297d41e3e2 /src/declarative/qml/qmlcontext.cpp
parentcf7f81933c593b1459d3afaf9cf8d968c81550cc (diff)
downloadQt-642440f41c5cd4b5f0ee66101b3ca32859293d29.zip
Qt-642440f41c5cd4b5f0ee66101b3ca32859293d29.tar.gz
Qt-642440f41c5cd4b5f0ee66101b3ca32859293d29.tar.bz2
Fix handling of empty strings for URLs
QUrl resolves empty to base, which is not desirable. Preserve emptiness of QUrl. Handle use of empty QUrl with WebView (WebKit doesn't handle empty URLs well either).
Diffstat (limited to 'src/declarative/qml/qmlcontext.cpp')
-rw-r--r--src/declarative/qml/qmlcontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp
index 61850c3..97ab375 100644
--- a/src/declarative/qml/qmlcontext.cpp
+++ b/src/declarative/qml/qmlcontext.cpp
@@ -422,7 +422,7 @@ void QmlContext::setContextProperty(const QString &name, QObject *value)
QUrl QmlContext::resolvedUrl(const QUrl &src)
{
QmlContext *ctxt = this;
- if (src.isRelative()) {
+ if (src.isRelative() && !src.isEmpty()) {
if (ctxt) {
while(ctxt) {
if(ctxt->d_func()->url.isValid())