diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-04-29 05:32:34 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-04-29 05:42:49 (GMT) |
commit | 9fb7035d59ffa582edabf53c5d617524ab92ae52 (patch) | |
tree | 2b7b7afab1db4e19bbf92d6ce39a28be452aac39 | |
parent | 7c3c3900538b1734b2ef74b3eda0b4f9bca76af9 (diff) | |
download | Qt-9fb7035d59ffa582edabf53c5d617524ab92ae52.zip Qt-9fb7035d59ffa582edabf53c5d617524ab92ae52.tar.gz Qt-9fb7035d59ffa582edabf53c5d617524ab92ae52.tar.bz2 |
Return enum property values as numbers, not QVariant values
Task-number: QTBUG-10291
Reviewed-by: akennedy
-rw-r--r-- | src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index bb5c8b7..671a262 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -265,7 +265,7 @@ QDeclarativeObjectScriptClass::property(QObject *obj, const Identifier &name) void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); return Value(scriptEngine, rv); - } else if (lastData->propType == QMetaType::Int) { + } else if (lastData->propType == QMetaType::Int || lastData->flags & QDeclarativePropertyCache::Data::IsEnumType) { int rv = 0; void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); |