summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/qmlbindablevalue.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlbindablevalue.cpp b/src/declarative/qml/qmlbindablevalue.cpp
index f2cfcf8..d1835cf 100644
--- a/src/declarative/qml/qmlbindablevalue.cpp
+++ b/src/declarative/qml/qmlbindablevalue.cpp
@@ -134,6 +134,13 @@ void QmlBindableValue::update()
} else {
QVariant value = this->value();
+ if ((uint)d->property.propertyType() >= QVariant::UserType &&
+ value.type() == QVariant::String) {
+ QmlMetaType::StringConverter con = QmlMetaType::customStringConverter(d->property.propertyType());
+ if (con)
+ value = con(value.toString());
+ }
+
if (d->property.propertyType() == QVariant::Url &&
value.canConvert(QVariant::String) && !value.isNull())
value.setValue(context()->resolvedUrl(QUrl(value.toString())));