aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmetatype_p.h
diff options
context:
space:
mode:
authorMichael Brasser <mbrasser@ford.com>2017-04-20 15:59:31 +0200
committerMichael Brasser <michael.brasser@live.com>2017-07-13 21:00:55 +0000
commit22a2cc43387ec3b9f74a6c01f8665378a4541147 (patch)
tree33acf5a5367302eb3f488b688aba7c85959035ae /src/qml/qml/qqmlmetatype_p.h
parent286f14f1e29e7f4e2db4517d087dd5c92606f971 (diff)
Add support for enum declarations in QML
Enums can be declared with the following syntax: enum MyEnum { Value1, Value2 } Grammar changes done by Simon Hausmann. [ChangeLog][QtQml] Enums can now be declared directly in QML. Task-number: QTBUG-14861 Change-Id: Ic6b6e032651d01ee2ecf9d5ce5734976cb3ad7ab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlmetatype_p.h')
-rw-r--r--src/qml/qml/qqmlmetatype_p.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index 4dd28bbd36..ead4f130ec 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -135,6 +135,7 @@ public:
struct QQmlMetaTypeData;
class QHashedCStringRef;
+class QQmlPropertyCache;
class Q_QML_PRIVATE_EXPORT QQmlType
{
public:
@@ -227,13 +228,7 @@ public:
private:
QQmlType *superType() const;
QQmlType *resolveCompositeBaseType(QQmlEnginePrivate *engine) const;
- int resolveCompositeEnumValue(QQmlEnginePrivate *engine, const QString &name, bool *ok) const;
- int resolveCompositeScopedEnumIndex(QQmlEnginePrivate *engine, const QV4::String *, bool *ok) const;
- int resolveCompositeScopedEnumIndex(QQmlEnginePrivate *engine, const QString &name, bool *ok) const;
- int resolveCompositeScopedEnumValue(QQmlEnginePrivate *engine, int index, const QV4::String *, bool *ok) const;
- int resolveCompositeScopedEnumValue(QQmlEnginePrivate *engine, int index, const QString &name, bool *ok) const;
- int resolveCompositeScopedEnumValue(QQmlEnginePrivate *engine, const QByteArray &scopedName, const QByteArray &name, bool *ok) const;
- int resolveCompositeScopedEnumValue(QQmlEnginePrivate *engine, const QStringRef &scopedName, const QStringRef &name, bool *ok) const;
+ QQmlPropertyCache *compositePropertyCache(QQmlEnginePrivate *engine) const;
friend class QQmlTypePrivate;
friend struct QQmlMetaTypeData;