소스 검색

add a timer to quit the application

Fixes #385
Steve Pieper 11 년 전
부모
커밋
43e0975318
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      Libs/Widgets/Testing/Cpp/ctkColorDialogTest1.cpp

+ 5 - 0
Libs/Widgets/Testing/Cpp/ctkColorDialogTest1.cpp

@@ -91,6 +91,11 @@ int ctkColorDialogTest1(int argc, char * argv [] )
     {
     QTimer::singleShot(200, &colorDialog, SLOT(accept()));
     }
+  // the following is only in interactive mode
+  if (argc < 2 || QString(argv[1]) != "-I" )
+    {
+    QTimer::singleShot(400, &app, SLOT(quit()));
+    }
 
   return app.exec();
 }