diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-08-14 03:43:27 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-08-14 03:43:27 (GMT) |
commit | e84c2895ff108b43515a5200a646610efea6d8da (patch) | |
tree | 568d45c3a0077a0348144def3cf42274b1eb5e95 /src | |
parent | 84756f93be62b5f901825f81484a733912d8f37c (diff) | |
download | Qt-e84c2895ff108b43515a5200a646610efea6d8da.zip Qt-e84c2895ff108b43515a5200a646610efea6d8da.tar.gz Qt-e84c2895ff108b43515a5200a646610efea6d8da.tar.bz2 |
Make sure URLs specified in a state change are resolved.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qmlsetproperties.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/declarative/util/qmlsetproperties.cpp b/src/declarative/util/qmlsetproperties.cpp index 482405c..a08f4ba 100644 --- a/src/declarative/util/qmlsetproperties.cpp +++ b/src/declarative/util/qmlsetproperties.cpp @@ -48,6 +48,7 @@ #include <private/qmlparser_p.h> #include <QtDeclarative/qmlexpression.h> #include <QtDeclarative/qmlbinding.h> +#include <QtDeclarative/qmlcontext.h> QT_BEGIN_NAMESPACE @@ -314,6 +315,11 @@ QmlSetProperties::ActionList QmlSetProperties::actions() if (a.property.isValid()) { a.restore = restoreEntryValues(); + + if (a.property.propertyType() == QVariant::Url && + (a.toValue.type() == QVariant::String || a.toValue.type() == QVariant::ByteArray) && !a.toValue.isNull()) + a.toValue.setValue(qmlContext(this)->resolvedUrl(QUrl(a.toValue.toString()))); //### d->object's context? + list << a; } } |