summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtest.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-10-04 22:06:19 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-10-05 21:53:10 +0200
commitfab1debb749e3bbe286ea637e011e586d49be0f8 (patch)
treed40161355b6ec0bda8c2e1b27dc72dde59474e01 /src/testlib/qtest.h
parent394f8a9c4b8c2d7c3c813c4855a17f2529af3d95 (diff)
QTest: support initMain() in QTEST_APPLESS_MAIN
The various macros that implement a test's main() call a test object initMain() static function, except for QTEST_APPLESS_MAIN. Add it to it. [ChangeLog][QtTest] initMain() is now also supported when using QTEST_APPLESS_MAIN. Change-Id: I46b1eae5ce3bb8c9a5aca525f193c9250e520c6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/testlib/qtest.h')
-rw-r--r--src/testlib/qtest.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index cee01e7217..894c59f39b 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -616,6 +616,7 @@ struct QtCoverageScanner
int main(int argc, char *argv[]) \
{ \
TESTLIB_SELFCOVERAGE_START(TestObject) \
+ QT_PREPEND_NAMESPACE(QTest::Internal::callInitMain)<TestObject>(); \
TestObject tc; \
QTEST_SET_MAIN_SOURCE_PATH \
return QTest::qExec(&tc, argc, argv); \