From fa987d44417528856d5e80ed7b48ba99e19fa307 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Thu, 19 Mar 2020 10:47:29 +0100 Subject: MetaObject: Store the QMetaType of the methods This does the analog of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 for the methods we care about (signals, slots, Q_INVOKABLEs). In addition to the actual QMetaType, we store an array with offsets so that we later can do a mapping from methodIndex to metatype. The newly added QMetaMethod::{return,parameter}MetaType methods can then be used to retrieve the metatypes. This does however require that all involved types are complete. This is unfortunately not a feasible requirement. Thus, we only populate the metatype array on a best effort basis. For any incomplete type, we store QMetaType::Unknown. Then, when accessing the metatype, we fall back to the old string based code base if it's Unknown. Squashes "moc: support incomplete types" and "Fix compile failures after QMetaMethod change" Fixes: QTBUG-82932 Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4 Reviewed-by: Lars Knoll --- src/gui/kernel/qoffscreensurface.h | 1 + src/gui/kernel/qplatformdialoghelper.h | 2 ++ src/gui/kernel/qplatformnativeinterface.h | 1 + src/gui/kernel/qplatformsystemtrayicon.h | 1 + 4 files changed, 5 insertions(+) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qoffscreensurface.h b/src/gui/kernel/qoffscreensurface.h index 1b9e7c00ca..cfdcd758ec 100644 --- a/src/gui/kernel/qoffscreensurface.h +++ b/src/gui/kernel/qoffscreensurface.h @@ -43,6 +43,7 @@ #include #include #include +Q_MOC_INCLUDE() QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h index ba800a696f..fa58177a2d 100644 --- a/src/gui/kernel/qplatformdialoghelper.h +++ b/src/gui/kernel/qplatformdialoghelper.h @@ -58,6 +58,8 @@ #include #include #include +Q_MOC_INCLUDE() +Q_MOC_INCLUDE() QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qplatformnativeinterface.h b/src/gui/kernel/qplatformnativeinterface.h index 95d6a03dbb..58c8f6b414 100644 --- a/src/gui/kernel/qplatformnativeinterface.h +++ b/src/gui/kernel/qplatformnativeinterface.h @@ -66,6 +66,7 @@ class QBackingStore; class Q_GUI_EXPORT QPlatformNativeInterface : public QObject { Q_OBJECT + Q_MOC_INCLUDE() public: virtual void *nativeResourceForIntegration(const QByteArray &resource); virtual void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context); diff --git a/src/gui/kernel/qplatformsystemtrayicon.h b/src/gui/kernel/qplatformsystemtrayicon.h index 948a6c099d..bd74a2cc0a 100644 --- a/src/gui/kernel/qplatformsystemtrayicon.h +++ b/src/gui/kernel/qplatformsystemtrayicon.h @@ -57,6 +57,7 @@ class QRect; class Q_GUI_EXPORT QPlatformSystemTrayIcon : public QObject { Q_OBJECT + Q_MOC_INCLUDE() public: enum ActivationReason { Unknown, -- cgit v1.2.3