From 5b413852ddf3304876d3685558f8ec73ab9af96b Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 14 Dec 2011 17:31:15 +1000 Subject: 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 --- src/testlib/qtestcase.cpp | 19 ++++++++++++------- 1 file 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 -- cgit v1.2.3