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/gui/kernel/qguivariant.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/gui/kernel/qguivariant.cpp') diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp index edca8d9423..2d6d12cc21 100644 --- a/src/gui/kernel/qguivariant.cpp +++ b/src/gui/kernel/qguivariant.cpp @@ -44,7 +44,9 @@ #include "qcursor.h" #include "qfont.h" #include "qimage.h" -#include "qkeysequence.h" +#if QT_CONFIG(shortcut) +# include "qkeysequence.h" +#endif #include "qtransform.h" #include "qmatrix.h" #include "qpalette.h" @@ -188,7 +190,7 @@ static bool convert(const QVariant::Private *d, int t, case QVariant::String: { QString *str = static_cast(result); switch (d->type) { -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) case QVariant::KeySequence: *str = (*v_cast(d)).toString(QKeySequence::NativeText); return true; @@ -238,7 +240,7 @@ static bool convert(const QVariant::Private *d, int t, return true; } break; -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) case QVariant::Int: if (d->type == QVariant::KeySequence) { const QKeySequence &seq = *v_cast(d); @@ -277,7 +279,7 @@ static bool convert(const QVariant::Private *d, int t, return true; } break; -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) case QVariant::KeySequence: { QKeySequence *seq = static_cast(result); switch (d->type) { -- cgit v1.2.3