Kaydet (Commit) 9bb6863f authored tarafından Caolán McNamara's avatar Caolán McNamara

afl-eventtesting: it has learned to open dialogs, so...

close all open dialogs on quitting to avoid triggering
the hang timeout and get things moving faster

Change-Id: I7469a32549f20d6b0971932e3334cb322f57b1ff
üst 967ea727
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <unotools/configmgr.hxx> #include <unotools/configmgr.hxx>
#include <unotools/syslocaleoptions.hxx> #include <unotools/syslocaleoptions.hxx>
#include "vcl/dialog.hxx"
#include "vcl/settings.hxx" #include "vcl/settings.hxx"
#include "vcl/keycod.hxx" #include "vcl/keycod.hxx"
#include "vcl/event.hxx" #include "vcl/event.hxx"
...@@ -347,6 +348,17 @@ namespace ...@@ -347,6 +348,17 @@ namespace
ImplWindowFrameProc(xWin.get(), NULL, SALEVENT_KEYUP, &aKeyEvent); ImplWindowFrameProc(xWin.get(), NULL, SALEVENT_KEYUP, &aKeyEvent);
return true; return true;
} }
void CloseDialogsAndQuit()
{
vcl::Window* pAppWindow = Application::GetFirstTopLevelWindow();
while (pAppWindow)
{
Dialog::EndAllDialogs(pAppWindow);
pAppWindow = Application::GetNextTopLevelWindow(pAppWindow);
}
Application::Quit();
}
} }
IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void) IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void)
...@@ -357,7 +369,7 @@ IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void) ...@@ -357,7 +369,7 @@ IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void)
delete mpEventTestInput; delete mpEventTestInput;
delete mpEventTestingIdle; delete mpEventTestingIdle;
SAL_INFO("vcl.eventtesting", "Event Limit reached, exiting" << mnEventTestLimit); SAL_INFO("vcl.eventtesting", "Event Limit reached, exiting" << mnEventTestLimit);
Application::Quit(); CloseDialogsAndQuit();
} }
else else
{ {
...@@ -369,7 +381,7 @@ IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void) ...@@ -369,7 +381,7 @@ IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void)
delete mpEventTestInput; delete mpEventTestInput;
delete mpEventTestingIdle; delete mpEventTestingIdle;
SAL_INFO("vcl.eventtesting", "Event Input exhausted, exiting" << mnEventTestLimit); SAL_INFO("vcl.eventtesting", "Event Input exhausted, exiting" << mnEventTestLimit);
Application::Quit(); CloseDialogsAndQuit();
return; return;
} }
Scheduler::ProcessTaskScheduling(true); Scheduler::ProcessTaskScheduling(true);
......
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