diff --git a/test/testfolderwatcher.cpp b/test/testfolderwatcher.cpp index e2b8eb423..89d5d62d8 100644 --- a/test/testfolderwatcher.cpp +++ b/test/testfolderwatcher.cpp @@ -171,7 +171,13 @@ private slots: }; #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QTEST_MAIN(TestFolderWatcher) +// Qt4 does not have QTEST_GUILESS_MAIN, so we simulate it. +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + TestFolderWatcher tc; + return QTest::qExec(&tc, argc, argv); +} #else QTEST_GUILESS_MAIN(TestFolderWatcher) #endif diff --git a/test/testxmlparse.cpp b/test/testxmlparse.cpp index 5e49f7ee8..4b7f7bd69 100644 --- a/test/testxmlparse.cpp +++ b/test/testxmlparse.cpp @@ -442,7 +442,13 @@ private slots: }; #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QTEST_MAIN(TestXmlParse) +// Qt4 does not have QTEST_GUILESS_MAIN, so we simulate it. +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + TestXmlParse tc; + return QTest::qExec(&tc, argc, argv); +} #else QTEST_GUILESS_MAIN(TestXmlParse) #endif