summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-04-29 05:32:34 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-04-29 05:42:49 (GMT)
commit9fb7035d59ffa582edabf53c5d617524ab92ae52 (patch)
tree2b7b7afab1db4e19bbf92d6ce39a28be452aac39
parent7c3c3900538b1734b2ef74b3eda0b4f9bca76af9 (diff)
downloadQt-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.cpp2
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);