Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qt_tstfrm')
-rw-r--r--qt_tstfrm/test_main_loop.cpp5
-rw-r--r--qt_tstfrm/test_main_loop.hpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/qt_tstfrm/test_main_loop.cpp b/qt_tstfrm/test_main_loop.cpp
index 9108b2ceb0..1e71a14041 100644
--- a/qt_tstfrm/test_main_loop.cpp
+++ b/qt_tstfrm/test_main_loop.cpp
@@ -13,7 +13,7 @@ TestMainLoop::TestMainLoop(TestMainLoop::TRednerFn const & fn)
{
}
-void TestMainLoop::exec(char const * testName)
+void TestMainLoop::exec(char const * testName, bool autoExit)
{
char * buf = (char *)malloc(strlen(testName) + 1);
MY_SCOPE_GUARD(argvFreeFun, [&buf](){ free(buf); });
@@ -21,7 +21,8 @@ void TestMainLoop::exec(char const * testName)
int argc = 1;
QApplication app(argc, &buf);
- QTimer::singleShot(3000, &app, SLOT(quit()));
+ if (autoExit)
+ QTimer::singleShot(3000, &app, SLOT(quit()));
QWidget w;
w.setWindowTitle(testName);
diff --git a/qt_tstfrm/test_main_loop.hpp b/qt_tstfrm/test_main_loop.hpp
index 6e0b41b1d1..ea879afee6 100644
--- a/qt_tstfrm/test_main_loop.hpp
+++ b/qt_tstfrm/test_main_loop.hpp
@@ -15,7 +15,7 @@ public:
TestMainLoop(TRednerFn const & fn);
virtual ~TestMainLoop() {}
- void exec(char const * testName);
+ void exec(char const * testName, bool autoExit = true);
protected:
bool eventFilter(QObject * obj, QEvent * event);