From 3ff864cf3ec30af8f5a7522eef7bc170d7e99911 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 24 Jul 2009 14:50:34 +1000 Subject: Make custom string converters work for builtin variant metatypes With QVector3D now being a builtin variant type, the string converter code broke. This change looks for string converters for all kinds of types, just as in the rest of the QML code. --- src/declarative/qml/qmlbinding.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/declarative/qml/qmlbinding.cpp b/src/declarative/qml/qmlbinding.cpp index 431dd66..41cef49 100644 --- a/src/declarative/qml/qmlbinding.cpp +++ b/src/declarative/qml/qmlbinding.cpp @@ -139,8 +139,7 @@ void QmlBinding::update() } else { QVariant value = this->value(); - if ((uint)d->property.propertyType() >= QVariant::UserType && - value.type() == QVariant::String) { + if (value.type() == QVariant::String) { QmlMetaType::StringConverter con = QmlMetaType::customStringConverter(d->property.propertyType()); if (con) value = con(value.toString()); -- cgit v0.12