From fad919927f2ab2ca3e9eebb59c5f3a9171b068a5 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 14 Oct 2009 18:08:58 +0200 Subject: Disable tst_QTableView::tabFocus to work when qt_tab_all_widget is disabled Logic copied from the QMenu test Also do the same in the QButtonGroup test --- tests/auto/qbuttongroup/tst_qbuttongroup.cpp | 11 ++++++----- tests/auto/qtableview/tst_qtableview.cpp | 6 ++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp index a19f865..b568068 100644 --- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp +++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp @@ -128,14 +128,15 @@ void tst_QButtonGroup::cleanup() { } +QT_BEGIN_NAMESPACE +extern bool qt_tab_all_widgets; +QT_END_NAMESPACE + + void tst_QButtonGroup::arrowKeyNavigation() { -#ifdef Q_WS_MAC - QSettings appleSettings(QLatin1String("apple.com")); - QVariant appleValue = appleSettings.value(QLatin1String("AppleKeyboardUIMode"), 0); - if (!(appleValue.toInt() & 0x2)) + if (!qt_tab_all_widgets) QSKIP("This test requires full keyboard control to be enabled.", SkipAll); -#endif QDialog dlg(0); QHBoxLayout layout(&dlg); diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 78a0dfd..d92656c 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -3250,9 +3250,15 @@ void tst_QTableView::resizeToContents() } +QT_BEGIN_NAMESPACE + extern bool qt_tab_all_widgets; // qapplication_mac.cpp +QT_END_NAMESPACE void tst_QTableView::tabFocus() { + if (!qt_tab_all_widgets) + QSKIP("This test requires full keyboard control to be enabled.", SkipAll); + // QTableView enables tabKeyNavigation by default, but you should be able // to change focus on an empty table view, or on a table view that doesn't // have this property set. -- cgit v0.12