diff options
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qdeclarativevaluetypescriptclass.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp b/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp index cb1f27d..f06d6ae 100644 --- a/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp +++ b/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp @@ -168,6 +168,8 @@ void QDeclarativeValueTypeScriptClass::setProperty(Object *obj, const Identifier ref->type->read(ref->object, ref->property); QMetaProperty p = ref->type->metaObject()->property(m_lastIndex); + if (p.isEnumType() && (QMetaType::Type)v.type() == QMetaType::QReal) + v = v.toInt(); p.write(ref->type, v); ref->type->write(ref->object, ref->property, 0); } else { |