summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtest.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtest.h')
-rw-r--r--src/testlib/qtest.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index e671828b77..66e747a2ac 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -290,6 +290,14 @@ int main(int argc, char *argv[]) \
#endif // QT_GUI_LIB
+#define QTEST_GUILESS_MAIN(TestObject) \
+int main(int argc, char *argv[]) \
+{ \
+ QCoreApplication app(argc, argv); \
+ TestObject tc; \
+ return QTest::qExec(&tc, argc, argv); \
+}
+
QT_END_HEADER
#endif