diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 11:49:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 16:45:10 +0100 |
commit | d7f3eed145fa8220bb34de1f21403d80b2b3f5ae (patch) | |
tree | e7169923e3f47e9427c8a9f21d21e9fd47abbb12 | |
parent | 7e0108266d7338d14ff953efcce0c019f693dd55 (diff) |
afl-eventtesting: improve event testing exit
don't "Quit" twice and skip tearing down office ipc etc for the pseudo-quit
AFL_PERSISTENT=1 case
Change-Id: I26f0e798b95bc9376890381d4e5bd87fe8f12622
-rw-r--r-- | framework/source/services/desktop.cxx | 9 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index d6c427ed6b84..2f02a4ce5e23 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -231,8 +231,13 @@ sal_Bool SAL_CALL Desktop::terminate() // try to close all open frames. // Allow using of any UI ... because Desktop.terminate() was designed as UI functionality in the past. - bool bAllowUI = !Application::IsEventTestingModeEnabled(); - bool bFramesClosed = impl_closeFrames(bAllowUI); + bool bIsEventTestingMode = Application::IsEventTestingModeEnabled(); + bool bFramesClosed = impl_closeFrames(!bIsEventTestingMode); + if (bIsEventTestingMode) + { + Application::Quit(); + return true; + } if ( ! bFramesClosed ) { impl_sendCancelTerminationEvent(lCalledTerminationListener); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 81ab92a34c0d..f4928aad469b 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -407,7 +407,6 @@ namespace Application::EndAllPopups(); Application::EndAllDialogs(); Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplPrepareExitMsg ) ); - Application::Quit(); } } |