diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2012-10-10 12:46:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-10 13:03:00 +0200 |
commit | 571545590149fe9bb3cce308490d66ac2c3f1318 (patch) | |
tree | ca272f3f97cfc8eaf8723b4a6d498cd9d7c8f192 /tests/auto/widgets/kernel/qapplication | |
parent | 9418be80ec0e8a2629ff9bbb4d1a1c6309aa763d (diff) |
tst_QApplication: Make sure the native style is being used
The tst_QApplication::args() auto-test sets the style to windows style
but there is no way to reset the style back to the native one. This
makes tst_QApplication::focusChanged() fail on Mac in some cases,
since not all the styles respond the same way to tab vs. strong
focus changes.
Change-Id: I91e39c1dd0fad4d90f3a13ab50a5e9758922ac28
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'tests/auto/widgets/kernel/qapplication')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 2250fe390f..2a3a3a166e 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -516,6 +516,8 @@ void tst_QApplication::args() QCOMPARE( argv_out, args_out ); delete [] argv; + // Make sure we switch back to native style. + QApplicationPrivate::styleOverride = QString(); } void tst_QApplication::appName() |