diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-03-19 10:47:29 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-06-02 22:42:15 +0200 |
commit | fa987d44417528856d5e80ed7b48ba99e19fa307 (patch) | |
tree | 50cd74c1a9dd3c2197f7de2ac0d431a5b16b0a42 /src/plugins | |
parent | 5306fdabc1ceb09875f791526553b3665017f7ce (diff) |
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 <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins')
4 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/generic/tuiotouch/qtuiohandler_p.h b/src/plugins/generic/tuiotouch/qtuiohandler_p.h index 2e444f2a0d..eb68baa915 100644 --- a/src/plugins/generic/tuiotouch/qtuiohandler_p.h +++ b/src/plugins/generic/tuiotouch/qtuiohandler_p.h @@ -59,6 +59,7 @@ class QTuioToken; class QTuioHandler : public QObject { Q_OBJECT + Q_MOC_INCLUDE("qoscmessage_p.h") public: explicit QTuioHandler(const QString &specification); diff --git a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h index b1de1b1094..29e862ecc1 100644 --- a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h +++ b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h @@ -45,6 +45,7 @@ #include <xkbcommon/xkbcommon-compose.h> +Q_DECLARE_OPAQUE_POINTER(xkb_context *) QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcXkbCompose) diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 6b97eb710b..13a4b0301b 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -524,6 +524,6 @@ void QCocoaIntegration::focusWindowChanged(QWindow *focusWindow) setApplicationIcon(focusWindow->icon()); } -#include "moc_qcocoaintegration.cpp" - QT_END_NAMESPACE + +#include "moc_qcocoaintegration.cpp" diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.h b/src/plugins/platforms/cocoa/qcocoanativeinterface.h index 70d25e345a..c30297c8ca 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.h +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.h @@ -44,6 +44,9 @@ #include <qpa/qplatformnativeinterface.h> #include <QtGui/qpixmap.h> +Q_MOC_INCLUDE(<QWindow>) +Q_MOC_INCLUDE(<qpa/qplatformprintersupport.h>) +Q_MOC_INCLUDE(<QPrintEngine>) QT_BEGIN_NAMESPACE |