diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-06-23 13:09:03 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-02 16:32:37 +0000 |
commit | a6633e41e7c6795bbbc016ce36e4ff91ec5248ad (patch) | |
tree | 084c03ead7bc38c146333e262637f3fd0a45881d /src/qml/qml/qqmlmetatype_p.h | |
parent | ee1de29c2dcb16a4b0c691c7fc53310e175fa49f (diff) |
Use QQmlType by value in the type wrapper
Task-number: QTBUG-61536
Change-Id: Ie40cb3a6e170331b0ec7ab5deaf7c1d7ef0cdaeb
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h index e3752b7bf8..08198340f3 100644 --- a/src/qml/qml/qqmlmetatype_p.h +++ b/src/qml/qml/qqmlmetatype_p.h @@ -141,6 +141,7 @@ public: QQmlType(); QQmlType(const QQmlType &other); QQmlType &operator =(const QQmlType &other); + explicit QQmlType(QQmlTypePrivate *priv); ~QQmlType(); bool isValid() const { return d != 0; } @@ -223,6 +224,10 @@ public: int enumValue(QQmlEnginePrivate *engine, const QHashedStringRef &, bool *ok) const; int enumValue(QQmlEnginePrivate *engine, const QHashedCStringRef &, bool *ok) const; int enumValue(QQmlEnginePrivate *engine, const QV4::String *, bool *ok) const; + + QQmlTypePrivate *handle() const { return d; } + static void refHandle(QQmlTypePrivate *priv); + static void derefHandle(QQmlTypePrivate *priv); private: QQmlType *superType() const; QQmlType *resolveCompositeBaseType(QQmlEnginePrivate *engine) const; |