diff options
author | Michael Brasser <mbrasser@ford.com> | 2017-04-13 17:10:45 -0500 |
---|---|---|
committer | Michael Brasser <michael.brasser@live.com> | 2017-05-03 11:38:21 +0000 |
commit | aae18aa05719c4b750905f467f42002f4cea1516 (patch) | |
tree | 167e75ae3aa157b47fccd75266ba40aa0325b63a /src/qml/qml/qqmltypewrapper_p.h | |
parent | f7656d06c0d2095a8d8dd3b930e48dc98996634f (diff) |
C++11 scoped enum support for QML
[ChangeLog][QtQml] Support C++11 scoped enums in QML. These can now be
accessed as <TypeName>.<EnumName>.<EnumValue>
Change-Id: I29bd3f16e980f3e6f1b2390b5a8e9e8e999952a3
Task-number: QTBUG-54961
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypewrapper_p.h')
-rw-r--r-- | src/qml/qml/qqmltypewrapper_p.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/qml/qml/qqmltypewrapper_p.h b/src/qml/qml/qqmltypewrapper_p.h index c584458ed4..86b2e47f29 100644 --- a/src/qml/qml/qqmltypewrapper_p.h +++ b/src/qml/qml/qqmltypewrapper_p.h @@ -81,6 +81,13 @@ struct QmlTypeWrapper : Object { const void *importNamespace; }; +struct QQmlScopedEnumWrapper : Object { + void init() { Object::init(); } + void destroy() { Object::destroy(); } + int scopeEnumIndex; + QQmlType *type; +}; + } struct Q_QML_EXPORT QmlTypeWrapper : Object @@ -106,6 +113,14 @@ struct Q_QML_EXPORT QmlTypeWrapper : Object static ReturnedValue instanceOf(const Object *typeObject, const Value &var); }; +struct Q_QML_EXPORT QQmlScopedEnumWrapper : Object +{ + V4_OBJECT2(QQmlScopedEnumWrapper, Object) + V4_NEEDS_DESTROY + + static ReturnedValue get(const Managed *m, String *name, bool *hasProperty); +}; + } QT_END_NAMESPACE |