From dff3843d98d52e2c32fea07371f91117de0667e9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 18 Oct 2019 09:07:37 +0200 Subject: QShortcut: Properly port to the new configure system Move the feature to corelib so that the QMetaType enumeration values can be properly excluded and there is no need for a dummy class. Use QT_REQUIRE_CONFIG in the headers of classes to be disabled. Add headers/source files in the .pro file depending on the configure feature in libraries and tests. Add the necessary exclusions and use QT_CONFIG. Task-number: QTBUG-76493 Change-Id: I02499ebee1a3d6d9a1e5afd02517beed5f4536b7 Reviewed-by: Mitch Curtis --- src/corelib/kernel/qmetatype.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/corelib/kernel/qmetatype.h') diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 94a32cec02..d04f327223 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -151,6 +151,13 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId(); F(QVariantHash, 28, QVariantHash) \ F(QByteArrayList, 49, QByteArrayList) \ +#if QT_CONFIG(shortcut) +#define QT_FOR_EACH_STATIC_KEYSEQUENCE_CLASS(F)\ + F(QKeySequence, 75, QKeySequence) +#else +#define QT_FOR_EACH_STATIC_KEYSEQUENCE_CLASS(F) +#endif + #define QT_FOR_EACH_STATIC_GUI_CLASS(F)\ F(QFont, 64, QFont) \ F(QPixmap, 65, QPixmap) \ @@ -163,7 +170,7 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId(); F(QRegion, 72, QRegion) \ F(QBitmap, 73, QBitmap) \ F(QCursor, 74, QCursor) \ - F(QKeySequence, 75, QKeySequence) \ + QT_FOR_EACH_STATIC_KEYSEQUENCE_CLASS(F) \ F(QPen, 76, QPen) \ F(QTextLength, 77, QTextLength) \ F(QTextFormat, 78, QTextFormat) \ -- cgit v1.2.3