From de210c44b41699e0d687b3c3f271e43f57eca60c Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Thu, 27 Oct 2011 11:26:51 +0300 Subject: [PATCH] [mac] Use QApplication in unit tests instead of QCoreApplication, because on Mac QCoreApplication has not implemented correctly event loop --- testing/testingmain.cpp | 12 ++++++++++-- 1 file 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 + #ifdef OMIM_OS_MAC // on Mac OS X native run loop works only for QApplication :( + #include + #define QAPP QApplication + #else + #include + #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);