diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-04-02 10:33:00 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-06-11 19:39:55 +0200 |
commit | 9b383f3d5c9774cff8a054027094bf1abf41c84f (patch) | |
tree | 245e3dc169e6018e597ed079f7feefafadb27b3c /src/corelib/kernel/qmetaobject.h | |
parent | f5e8f9c814f0a0383192a5cb2ec5e6da8b3b8061 (diff) |
Further metaobject cleanups
Remove QMetaProperty index member. Instead, add a function to compute it
on demand from the QMetaObject.
Also remove the remains of the signature function.
Original-patch-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: I5b16d444e7474216a535e3e93a118825cd0e6090
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.h')
-rw-r--r-- | src/corelib/kernel/qmetaobject.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h index ed65f8733f..3a9104c305 100644 --- a/src/corelib/kernel/qmetaobject.h +++ b/src/corelib/kernel/qmetaobject.h @@ -178,12 +178,6 @@ public: } private: -#if QT_DEPRECATED_SINCE(5,0) - // signature() has been renamed to methodSignature() in Qt 5. - // Warning, that function returns a QByteArray; check the life time if - // you convert to char*. - char *signature(struct renamedInQt5_warning_checkTheLifeTime * = nullptr) = delete; -#endif static QMetaMethod fromSignalImpl(const QMetaObject *, void **); static QMetaMethod fromRelativeMethodIndex(const QMetaObject *mobj, int index); static QMetaMethod fromRelativeConstructorIndex(const QMetaObject *mobj, int index); @@ -201,6 +195,9 @@ private: const uint *d; }; + constexpr QMetaMethod(const QMetaObject *metaObject, const Data &data_) + : mobj(metaObject), data(data_) + {} const QMetaObject *mobj; Data data; @@ -276,7 +273,7 @@ Q_DECLARE_TYPEINFO(QMetaEnum, Q_MOVABLE_TYPE); class Q_CORE_EXPORT QMetaProperty { public: - constexpr QMetaProperty() : mobj(nullptr), data({ nullptr }), idx(-1) {} + constexpr QMetaProperty() : mobj(nullptr), data({ nullptr }) {} const char *name() const; const char *typeName() const; @@ -335,6 +332,8 @@ private: uint notifyIndex() const { return d[3]; } uint revision() const { return d[4]; } + int index(const QMetaObject *mobj) const; + const uint *d; }; @@ -342,7 +341,6 @@ private: const QMetaObject *mobj; Data data; - int idx; QMetaEnum menum; friend struct QMetaObject; friend struct QMetaObjectPrivate; |