From bab5421dbf76f1dbe42551c6724fd8d3f015bcd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 18 Sep 2024 15:50:30 +0200 Subject: [PATCH] tst_QDialogButtonBox::hideAndShowButton: Check for Qt::TabFocusAllControls The test requires Qt::TabFocusAllControls, so Qt::TabFocusTextControls and/or Qt::TabFocusListControls, which is the default on macOS, is not sufficient. Change-Id: Ideb673f570125c0d73c67a408f3d144f29052ace Reviewed-by: Volker Hilsheimer (cherry picked from commit 0a1c5d6e7de13afdb76161a6655d1024df03f454) Reviewed-by: Qt Cherry-pick Bot --- .../widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp index 3e7dc92da11..ee2c7e8714e 100644 --- a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp +++ b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp @@ -386,8 +386,8 @@ void tst_QDialogButtonBox::removeButton() #ifdef QT_BUILD_INTERNAL void tst_QDialogButtonBox::hideAndShowButton() { - if (QGuiApplication::styleHints()->tabFocusBehavior() == Qt::NoTabFocus) - QSKIP("Test skipped with Qt::NoTabFocus"); + if (QGuiApplication::styleHints()->tabFocusBehavior() != Qt::TabFocusAllControls) + QSKIP("Test requires Qt::TabFocusAllControls tab focus behavior"); QDialogButtonBox buttonBox; QDialogButtonBoxPrivate *d = static_cast(QObjectPrivate::get(&buttonBox));