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 <volker.hilsheimer@qt.io>
(cherry picked from commit 0a1c5d6e7de13afdb76161a6655d1024df03f454)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2024-09-18 15:50:30 +02:00 committed by Qt Cherry-pick Bot
parent 63a4def507
commit bab5421dbf

View File

@ -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<QDialogButtonBoxPrivate *>(QObjectPrivate::get(&buttonBox));