diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-12-14 17:31:15 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-15 01:57:53 +0100 |
commit | 5b413852ddf3304876d3685558f8ec73ab9af96b (patch) | |
tree | 2bf881a865e5ef8ac1c7ddfbb67836c5cdd46f7d /src/testlib | |
parent | c45f9c7761a9016ff20c8c427cb5c84aba56bc57 (diff) |
Update documentation of QTEST_MAIN macro.
Update the docs to describe the behaviour that resulted from moving the
traditional Qt widgets into a separate library from the rest of GUI
classes.
Change-Id: Ibd0ef05cc871b8f5a6700e421aa41bdf64c1210b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestcase.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index aee225742a..54bd1bb7f0 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -389,14 +389,19 @@ QT_BEGIN_NAMESPACE the \a TestClass, and executes all tests in the order they were defined. Use this macro to build stand-alone executables. - If \c QT_GUI_LIB is defined, the application object will be a QApplication, + If \c QT_WIDGETS_LIB is defined, the application object will be a QApplication, + if \c QT_GUI_LIB is defined, the application object will be a QGuiApplication, otherwise it will be a QCoreApplication. If qmake is used and the configuration - includes \c{QT += gui}, then \c QT_GUI_LIB will be defined automatically. - - \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. + includes \c{QT += widgets}, then \c QT_WIDGETS_LIB will be defined automatically. + Similarly, if qmake is used and the configuration includes \c{QT += gui}, then + \c QT_GUI_LIB will be defined automatically. + + \bold {Note:} On platforms that have keypad navigation enabled by default, + this macro will forcefully disable it if \c QT_WIDGETS_LIB is defined. This is done + 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 by calling + \l {QApplication::setNavigationMode()}. Example: \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 11 |