diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-06-18 05:34:54 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-06-18 05:34:54 (GMT) |
commit | d41772626b7d85e74b91f702c22308421f7ac3f7 (patch) | |
tree | c2879733044def204101a071083393f3275729b3 /src/declarative/qml/qmlmetaproperty.cpp | |
parent | 00d6d725ed0c3eb7d2bc0d0187e66c0ee55ef4a7 (diff) | |
download | Qt-d41772626b7d85e74b91f702c22308421f7ac3f7.zip Qt-d41772626b7d85e74b91f702c22308421f7ac3f7.tar.gz Qt-d41772626b7d85e74b91f702c22308421f7ac3f7.tar.bz2 |
Use custom string converter in writeValueProperty()
Reviewed-by: Aaron Kennedy
Diffstat (limited to 'src/declarative/qml/qmlmetaproperty.cpp')
-rw-r--r-- | src/declarative/qml/qmlmetaproperty.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp index a152807..52036c2 100644 --- a/src/declarative/qml/qmlmetaproperty.cpp +++ b/src/declarative/qml/qmlmetaproperty.cpp @@ -814,6 +814,16 @@ void QmlMetaPropertyPrivate::writeValueProperty(const QVariant &value) default: + { + if ((uint)t >= QVariant::UserType && vt == QVariant::String) { + QmlMetaType::StringConverter con = QmlMetaType::customStringConverter(t); + if (con) { + QVariant v = con(value.toString()); + prop.write(object, v); + return; + } + } + } break; } prop.write(object, value); |