diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-09-11 06:06:29 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-09-11 06:06:29 (GMT) |
commit | bc7e8e12e96ff523278032d7c32c9bd504456de3 (patch) | |
tree | 8adf7f7aee3e01a0cede30dddcb31b53158931b8 /src/declarative/qml/qmlmetaproperty.cpp | |
parent | 283ad006223cd4c178465397d25edc70362612ae (diff) | |
download | Qt-bc7e8e12e96ff523278032d7c32c9bd504456de3.zip Qt-bc7e8e12e96ff523278032d7c32c9bd504456de3.tar.gz Qt-bc7e8e12e96ff523278032d7c32c9bd504456de3.tar.bz2 |
Fix that empty string "resolves" to empty URL.
Fix typo.
Diffstat (limited to 'src/declarative/qml/qmlmetaproperty.cpp')
-rw-r--r-- | src/declarative/qml/qmlmetaproperty.cpp | 7 |
1 files 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, |