diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-10-27 12:26:51 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:27:01 +0300 |
commit | de210c44b41699e0d687b3c3f271e43f57eca60c (patch) | |
tree | 4f9c1cf7a5e3989d3cce993decacec206ef6d68f /testing | |
parent | 1f3b207c88b347915f6b4e5bb6476cea9c34c804 (diff) |
[mac] Use QApplication in unit tests instead of QCoreApplication, because on Mac QCoreApplication has not implemented correctly event loop
Diffstat (limited to 'testing')
-rw-r--r-- | testing/testingmain.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/testing/testingmain.cpp b/testing/testingmain.cpp index baf330cca5..331af3cd0b 100644 --- a/testing/testingmain.cpp +++ b/testing/testingmain.cpp @@ -5,9 +5,16 @@ #include "../std/iostream.hpp" #include "../std/string.hpp" #include "../std/vector.hpp" +#include "../std/target_os.hpp" #ifdef OMIM_UNIT_TEST_WITH_QT_EVENT_LOOP - #include <QCoreApplication> + #ifdef OMIM_OS_MAC // on Mac OS X native run loop works only for QApplication :( + #include <QApplication> + #define QAPP QApplication + #else + #include <QCoreApplication> + #define QAPP QCoreApplication + #endif #endif static bool g_bLastTestOK = true; @@ -15,7 +22,8 @@ static bool g_bLastTestOK = true; int main(int argc, char * argv[]) { #ifdef OMIM_UNIT_TEST_WITH_QT_EVENT_LOOP - QCoreApplication theApp(argc, argv); + QAPP theApp(argc, argv); + UNUSED_VALUE(theApp); #else UNUSED_VALUE(argc); UNUSED_VALUE(argv); |