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 /tests/auto/widgets/widgets/qcommandlinkbutton | |
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 'tests/auto/widgets/widgets/qcommandlinkbutton')
-rw-r--r-- | tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp index 0044d33c66..45a23984e0 100644 --- a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp +++ b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp @@ -51,7 +51,9 @@ private slots: void getSetCheck(); void pressed(); +#if QT_CONFIG(shortcut) void setAccel(); +#endif void isCheckable(); void setDown(); void popupCrash(); @@ -133,8 +135,10 @@ void tst_QCommandLinkButton::init() testWidget->setText("Test"); testWidget->setDescription("Description text."); testWidget->setEnabled( true ); +#if QT_CONFIG(shortcut) QKeySequence seq; testWidget->setShortcut( seq ); +#endif resetCounters(); } @@ -327,6 +331,8 @@ void tst_QCommandLinkButton::toggled() QVERIFY( click_count == 1 ); } +#if QT_CONFIG(shortcut) + /* If we press an accelerator key we ONLY get a pressed signal and NOT a released or clicked signal. @@ -355,6 +361,8 @@ void tst_QCommandLinkButton::setAccel() QTest::qWait(200); } +#endif // QT_CONFIG(shortcut) + void tst_QCommandLinkButton::animateClick() { QVERIFY( !testWidget->isDown() ); |