Introduce new test macro for GUI applications.

Fixing linkage of the coreanimation examples on Windows.

Change-Id: Ic34cab329577b2ba430ca8a510b356c424d574af
Reviewed-on: http://codereview.qt.nokia.com/3605
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Friedemann Kleint 2011-08-25 16:34:40 +02:00
parent d1b3cc0d0c
commit 32f43000c5
2 changed files with 14 additions and 2 deletions

View File

@ -11,4 +11,4 @@ QT.widgets.libs = $$QT_MODULE_LIB_BASE
QT.widgets.plugins = $$QT_MODULE_PLUGIN_BASE
QT.widgets.imports = $$QT_MODULE_IMPORT_BASE
QT.widgets.depends = core network gui
QT.widgets.DEFINES = QT_GUI_LIB
QT.widgets.DEFINES = QT_WIDGETS_LIB

View File

@ -247,7 +247,7 @@ int main(int argc, char *argv[]) \
#include <QtTest/qtestsystem.h>
#ifdef QT_GUI_LIB
#if defined(QT_WIDGETS_LIB)
#include <QtTest/qtest_gui.h>
@ -266,6 +266,18 @@ int main(int argc, char *argv[]) \
return QTest::qExec(&tc, argc, argv); \
}
#elif defined(QT_GUI_LIB)
#include <QtTest/qtest_gui.h>
#define QTEST_MAIN(TestObject) \
int main(int argc, char *argv[]) \
{ \
QGuiApplication app(argc, argv); \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
#else
#define QTEST_MAIN(TestObject) \