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:
parent
d1b3cc0d0c
commit
32f43000c5
@ -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
|
||||
|
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user