diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-06-22 15:32:46 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-27 02:28:40 +0200 |
commit | a93c2608d69fa385c675a6b49e4d4bfb97f83ed2 (patch) | |
tree | 88b9bc5b459600d85c6519995367669396787568 /src/qml/qml/v8/qv8typewrapper.cpp | |
parent | a2aa4705702256c15aaaf64e08b90c4749233f9d (diff) |
Add enum values from related types
If moc marks a type as being related to another type (by using that
type's enums or properties), then include the enum values exported
by the related type in those exposed by the dependent type.
Task-number: QTBUG-22675
Change-Id: I78e72791a4f470200a9ba986a865ffac6c873725
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/v8/qv8typewrapper.cpp')
-rw-r--r-- | src/qml/qml/v8/qv8typewrapper.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/qml/v8/qv8typewrapper.cpp b/src/qml/qml/v8/qv8typewrapper.cpp index dbf369e678..ff7e599995 100644 --- a/src/qml/qml/v8/qv8typewrapper.cpp +++ b/src/qml/qml/v8/qv8typewrapper.cpp @@ -173,8 +173,9 @@ v8::Handle<v8::Value> QV8TypeWrapper::Getter(v8::Local<v8::String> property, QQmlType *type = resource->type; if (QV8Engine::startsWithUpper(property)) { - int value = type->enumValue(propertystring); - if (-1 != value) + bool ok = false; + int value = type->enumValue(propertystring, &ok); + if (ok) return v8::Integer::New(value); // Fall through to return empty handle |