Explorar o código

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

Olivier Goffart %!s(int64=9) %!d(string=hai) anos
pai
achega
a4310f0f5c
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      test/testchecksumvalidator.cpp

+ 7 - 1
test/testchecksumvalidator.cpp

@@ -151,7 +151,13 @@ using namespace OCC;
 };
 
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-    QTEST_MAIN(TestChecksumValidator)
+// Qt4 does not have QTEST_GUILESS_MAIN, so we simulate it.
+int main(int argc, char *argv[])
+{
+    QCoreApplication app(argc, argv);
+    TestChecksumValidator tc;
+    return QTest::qExec(&tc, argc, argv);
+}
 #else
     QTEST_GUILESS_MAIN(TestChecksumValidator)
 #endif