Browse Source

Merge branch '385-color-dialog-hang'

Steve Pieper 11 years ago
parent
commit
b8307961b6
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Libs/Widgets/Testing/Cpp/ctkColorDialogTest1.cpp

+ 4 - 1
Libs/Widgets/Testing/Cpp/ctkColorDialogTest1.cpp

@@ -25,6 +25,7 @@
 // CTK includes
 #include "ctkColorDialog.h"
 #include "ctkColorPickerButton.h"
+#include "ctkTest.h"
 
 // STD includes
 #include <cstdlib>
@@ -89,7 +90,9 @@ int ctkColorDialogTest1(int argc, char * argv [] )
   // the following is only in interactive mode
   if (argc < 2 || QString(argv[1]) != "-I" )
     {
-    QTimer::singleShot(200, &colorDialog, SLOT(accept()));
+    QTest::qWaitForWindowShown(&colorDialog);
+    colorDialog.accept();
+    return EXIT_SUCCESS;
     }
 
   return app.exec();