From bc7e8e12e96ff523278032d7c32c9bd504456de3 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 11 Sep 2009 16:06:29 +1000 Subject: Fix that empty string "resolves" to empty URL. Fix typo. --- src/declarative/qml/qmlmetaproperty.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp index affb93b..b305619 100644 --- a/src/declarative/qml/qmlmetaproperty.cpp +++ b/src/declarative/qml/qmlmetaproperty.cpp @@ -880,15 +880,14 @@ void QmlMetaPropertyPrivate::writeValueProperty(const QVariant &value) if (vt == QVariant::ByteArray) { u = QUrl(QLatin1String(value.toByteArray())); found = true; - } else if (QVariant::String) { + } else if (vt == QVariant::String) { u = QUrl(value.toString()); found = true; } - if (context && u.isRelative()) - u = context->baseUrl().resolved(u); - if (found) { + if (context && u.isRelative() && !u.isEmpty()) + u = context->baseUrl().resolved(u); void *a[1]; a[0] = &u; QMetaObject::metacall(object, -- cgit v0.12