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>
This commit is contained in:
Jason McDonald 2011-12-14 17:31:15 +10:00 committed by Qt by Nokia
parent c45f9c7761
commit 5b413852dd

View File

@ -389,14 +389,19 @@ QT_BEGIN_NAMESPACE
the \a TestClass, and executes all tests in the order they were defined. the \a TestClass, and executes all tests in the order they were defined.
Use this macro to build stand-alone executables. 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 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. 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 (eg: Symbian), \bold {Note:} On platforms that have keypad navigation enabled by default,
this macro will forcfully disable it to simplify the usage of key events when writing this macro will forcefully disable it if \c QT_WIDGETS_LIB is defined. This is done
autotests. If you wish to write a test case that uses keypad navigation, you should to simplify the usage of key events when writing autotests. If you wish to write a
enable it either in the \c {initTestCase()} or \c {init()} functions of your test case. 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: Example:
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 11 \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 11