summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-05-29 07:40:32 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-05-29 07:47:12 (GMT)
commitd4a8cb47cb106ad642e908763787407774619aac (patch)
tree871d15380006c52bca8a57ca966bd90fa192a284 /src/testlib/qtestcase.cpp
parentdcf5d568aba893d690eedbe1e18148b504de2abb (diff)
downloadQt-d4a8cb47cb106ad642e908763787407774619aac.zip
Qt-d4a8cb47cb106ad642e908763787407774619aac.tar.gz
Qt-d4a8cb47cb106ad642e908763787407774619aac.tar.bz2
Disable keypad navigation for the autotests and document it.
On Symbian keypad navigation is enabled by default since there is no reliable way to detect the presence of touch or not. Enabling this feature though causes problems for many of Qt's autotests since they were not written with this in mind. Many tests send QTest::key*() events to a widget and subsequently test the state of the widget, but with keypad navigation enabled, the behavior changes because the widget does not have edit focus by default. Reviewed-by: axis <qt-info@nokia.com>
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r--src/testlib/qtestcase.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 27ba6da..b676012 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -300,10 +300,15 @@ QT_BEGIN_NAMESPACE
the \a TestClass, and executes all tests in the order they were defined.
Use this macro to build stand-alone executables.
+ \bold {Note:} On platforms that have keypad navigation enabled by default (eg: Symbian),
+ this macro will forcfully disable it to simplify the usage of key events when writing
+ autotests. If you wish to write a test case that uses keypad navigation, you should
+ enable it either in the \c {initTestCase()} or \c {init()} functions of your test case.
+
Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 11
- \sa QTEST_APPLESS_MAIN(), QTest::qExec()
+ \sa QTEST_APPLESS_MAIN(), QTest::qExec(), QApplication::setKeypadNavigationEnabled()
*/
/*! \macro QTEST_APPLESS_MAIN(TestClass)