Commit c44c8d41 authored by David Partyka's avatar David Partyka

Add a configurable option that sets the delay between testing events.

By default this setting is 100 miliseconds. One can overide this setting on machines where this delay is not enough resulting in test playback to raise events faster than the gui can respond.
parent 1e4c0058
......@@ -20,6 +20,11 @@ IF(NOT DEFINED QtTesting_INSTALL_LIB_DIR)
SET(QtTesting_INSTALL_LIB_DIR lib)
ENDIF()
IF(NOT DEFINED QT_TESTING_EVENT_PLAYBACK_DELAY)
SET(QT_TESTING_EVENT_PLAYBACK_DELAY "100" CACHE STRING "Delay between invocation of each testing event." FORCE)
MARK_AS_ADVANCED(QT_TESTING_EVENT_PLAYBACK_DELAY)
ENDIF()
IF(QT_TESTING_WITH_PYTHON)
IF(NOT PythonLibs_FOUND)
......
......@@ -37,5 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#cmakedefine QT_TESTING_WITH_PYTHON
#define QT_TESTING_EVENT_PLAYBACK_DELAY @QT_TESTING_EVENT_PLAYBACK_DELAY@
#endif // _QtTestingConfigure_h
......@@ -222,7 +222,7 @@ void pqEventDispatcher::playEvent(int indent)
//QCoreApplication::flush();
if (print_debug) { cout << " -- pre-processEventsAndWait: " <<
local_counter <<endl;}
this->processEventsAndWait(100); // let what's going to happen after the
this->processEventsAndWait(QT_TESTING_EVENT_PLAYBACK_DELAY); // let what's going to happen after the
// playback, happen.
if (print_debug) { cout << " -- post-processEventsAndWait: " <<
local_counter <<endl;}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment