diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-10-18 09:07:37 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-10-25 12:12:39 +0200 |
commit | dff3843d98d52e2c32fea07371f91117de0667e9 (patch) | |
tree | 028199eebf8d92722de91412e32352c54cbd5183 /src/platformsupport/themes | |
parent | 5d5a0842dc87645eab468389198750adc01b0618 (diff) |
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 <mitch.curtis@qt.io>
Diffstat (limited to 'src/platformsupport/themes')
-rw-r--r-- | src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp | 4 | ||||
-rw-r--r-- | src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp index 82a13d2fa0..a3c9746869 100644 --- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp +++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp @@ -48,7 +48,9 @@ #include <QDebug> #include <QtEndian> #include <QBuffer> -#include <private/qkeysequence_p.h> +#if QT_CONFIG(shortcut) +# include <private/qkeysequence_p.h> +#endif #include <qpa/qplatformmenu.h> #include "qdbusplatformmenu_p.h" diff --git a/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h b/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h index 8a31f82fb0..aa0f303416 100644 --- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h +++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h @@ -96,7 +96,7 @@ public: void setChecked(bool isChecked) override; bool hasExclusiveGroup() const { return m_hasExclusiveGroup; } void setHasExclusiveGroup(bool hasExclusiveGroup) override; -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) QKeySequence shortcut() const { return m_shortcut; } void setShortcut(const QKeySequence& shortcut) override; #endif @@ -123,7 +123,9 @@ private: bool m_hasExclusiveGroup : 1; short /*unused*/ : 6; short m_dbusID : 16; +#if QT_CONFIG(shortcut) QKeySequence m_shortcut; +#endif }; class QDBusPlatformMenu : public QPlatformMenu |