summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-14 16:08:58 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-14 16:08:58 (GMT)
commitfad919927f2ab2ca3e9eebb59c5f3a9171b068a5 (patch)
tree2c490482c435e8215aafe76b625638dab6bc0d65
parent9b9e8ece43cf50a295a2a41f161be4231605e0b5 (diff)
downloadQt-fad919927f2ab2ca3e9eebb59c5f3a9171b068a5.zip
Qt-fad919927f2ab2ca3e9eebb59c5f3a9171b068a5.tar.gz
Qt-fad919927f2ab2ca3e9eebb59c5f3a9171b068a5.tar.bz2
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
-rw-r--r--tests/auto/qbuttongroup/tst_qbuttongroup.cpp11
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp6
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.