summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qaction/tst_qaction.cpp')
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
index 1247f48dd0..f19c577088 100644
--- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
+++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
@@ -57,23 +57,29 @@ private slots:
void setIconText();
void setUnknownFont();
void actionEvent();
+#if QT_CONFIG(shortcut)
void setStandardKeys();
void alternateShortcuts();
void enabledVisibleInteraction();
void task200823_tooltip();
+#endif
void task229128TriggeredSignalWithoutActiongroup();
void task229128TriggeredSignalWhenInActiongroup();
+#if QT_CONFIG(shortcut)
void repeat();
+#endif
void setData();
+#if QT_CONFIG(shortcut)
void keysequence(); // QTBUG-53381
void disableShortcutsWithBlockedWidgets_data();
void disableShortcutsWithBlockedWidgets();
void shortcutFromKeyEvent(); // QTBUG-48325
+#endif
private:
QEvent::Type m_lastEventType;
const int m_keyboardScheme;
- QAction *m_lastAction;
+ QGuiAction *m_lastAction;
};
tst_QAction::tst_QAction()
@@ -221,6 +227,8 @@ void tst_QAction::actionEvent()
QCOMPARE(m_lastAction, &a);
}
+#if QT_CONFIG(shortcut)
+
//basic testing of standard keys
void tst_QAction::setStandardKeys()
{
@@ -367,6 +375,8 @@ void tst_QAction::task200823_tooltip()
QCOMPARE(action->toolTip(), ref);
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QAction::task229128TriggeredSignalWithoutActiongroup()
{
// test without a group
@@ -408,6 +418,8 @@ void tst_QAction::task229128TriggeredSignalWhenInActiongroup()
QCOMPARE(actionSpy.count(), 1);
}
+#if QT_CONFIG(shortcut)
+
void tst_QAction::repeat()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
@@ -452,6 +464,8 @@ void tst_QAction::repeat()
QCOMPARE(spy.count(), 2);
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QAction::setData() // QTBUG-62006
{
QAction act(nullptr);
@@ -467,6 +481,8 @@ void tst_QAction::setData() // QTBUG-62006
QCOMPARE(spy.count(), 1);
}
+#if QT_CONFIG(shortcut)
+
void tst_QAction::disableShortcutsWithBlockedWidgets_data()
{
QTest::addColumn<Qt::ShortcutContext>("shortcutContext");
@@ -556,5 +572,7 @@ void tst_QAction::shortcutFromKeyEvent()
QCOMPARE(testWidget.shortcutOverrideCount, 1);
}
+#endif // QT_CONFIG(shortcut)
+
QTEST_MAIN(tst_QAction)
#include "tst_qaction.moc"