Qt4: don't require a X server in the tests

Previous commit was not enough
This commit is contained in:
Olivier Goffart 2016-07-12 11:07:12 +02:00
parent a4310f0f5c
commit 927a8b5071
2 changed files with 14 additions and 2 deletions

View file

@ -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

View file

@ -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