summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2012-02-20 15:12:50 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-21 02:27:23 +0100
commit8a182591be39e4c02f8acd907b31e5bebbd828a5 (patch)
tree42c9590837307076d1a4445f46b72dc97b5b0241
parent4c56db58a285a7177c735f278f4a6ecd84122e9d (diff)
tst_qapplication: mark expected failure on mac
The tab key behavior in Qt5 no longer respects the "Text boxes and lists only" tab navigation option in OSX, which is the default. This is a regression since Qt4. Task-number: QTBUG-24372 Change-Id: I54c1663f8fb259dd847083432102a0bfad7dd69c Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index cba8675bee..4d52e6215e 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -69,6 +69,10 @@
#include <windows.h>
#endif
+QT_BEGIN_NAMESPACE
+extern bool Q_GUI_EXPORT qt_tab_all_widgets; // from qapplication.cpp
+QT_END_NAMESPACE
+
class tst_QApplication : public QObject
{
Q_OBJECT
@@ -1525,8 +1529,15 @@ void tst_QApplication::focusChanged()
QSettings appleSettings(QLatin1String("apple.com"));
QVariant appleValue = appleSettings.value(QLatin1String("AppleKeyboardUIMode"), 0);
tabAllControls = (appleValue.toInt() & 0x2);
+ if (!tabAllControls) {
+ QEXPECT_FAIL("", "QTBUG-24372 Mac tab key \"Text boxes and lists only\" vs "
+ "\"All controls\" setting is not respected in Qt5", Abort);
+ }
#endif
+ // make sure Qt's idea of tabbing between widgets matches what we think it should
+ QCOMPARE(qt_tab_all_widgets, tabAllControls);
+
tab.simulate(now);
if (!tabAllControls) {
QVERIFY(spy.count() == 0);