Kaydet (Commit) 256c5c3f authored tarafından Tobias Madl's avatar Tobias Madl

Idle and Timer are now completely independent

And everything is functionating pretty well.

Change-Id: Id7f5a995362f6f7c5235f2e9facb7c7f119f3140
üst 57656eb1
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
SfxEventAsyncer_Impl( const SfxEventHint& rHint ); SfxEventAsyncer_Impl( const SfxEventHint& rHint );
virtual ~SfxEventAsyncer_Impl(); virtual ~SfxEventAsyncer_Impl();
DECL_LINK( TimerHdl, Timer*); DECL_LINK( IdleHdl, Idle*);
}; };
...@@ -114,7 +114,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint ) ...@@ -114,7 +114,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint )
if( rHint.GetObjShell() ) if( rHint.GetObjShell() )
StartListening( *rHint.GetObjShell() ); StartListening( *rHint.GetObjShell() );
pIdle = new Idle; pIdle = new Idle;
pIdle->SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, TimerHdl) ); pIdle->SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, IdleHdl) );
pIdle->SetPriority( IdlePriority::VCL_IDLE_PRIORITY_HIGHEST ); pIdle->SetPriority( IdlePriority::VCL_IDLE_PRIORITY_HIGHEST );
pIdle->Start(); pIdle->Start();
} }
...@@ -128,10 +128,10 @@ SfxEventAsyncer_Impl::~SfxEventAsyncer_Impl() ...@@ -128,10 +128,10 @@ SfxEventAsyncer_Impl::~SfxEventAsyncer_Impl()
IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer) IMPL_LINK(SfxEventAsyncer_Impl, IdleHdl, Idle*, pAsyncIdle)
{ {
SfxObjectShellRef xRef( aHint.GetObjShell() ); SfxObjectShellRef xRef( aHint.GetObjShell() );
pAsyncTimer->Stop(); pAsyncIdle->Stop();
#ifdef DBG_UTIL #ifdef DBG_UTIL
if (!xRef.Is()) if (!xRef.Is())
{ {
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <vcl/edit.hxx> #include <vcl/edit.hxx>
#include <vcl/timer.hxx> #include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <sfx2/unoctitm.hxx> #include <sfx2/unoctitm.hxx>
#include "app.hrc" #include "app.hrc"
...@@ -110,6 +111,7 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a ...@@ -110,6 +111,7 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a
// Timers may access the SfxApplication and are only deleted in // Timers may access the SfxApplication and are only deleted in
// Application::Quit(), which is asynchronous (PostUserEvent) - disable! // Application::Quit(), which is asynchronous (PostUserEvent) - disable!
Timer::ImplDeInitTimer(); Timer::ImplDeInitTimer();
Idle::ImplDeInitIdle();
SfxApplication* pApp = SfxGetpApp(); SfxApplication* pApp = SfxGetpApp();
pApp->Broadcast( SfxSimpleHint( SFX_HINT_DEINITIALIZING ) ); pApp->Broadcast( SfxSimpleHint( SFX_HINT_DEINITIALIZING ) );
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "vcl/svapp.hxx" #include "vcl/svapp.hxx"
#include "vcl/wrkwin.hxx" #include "vcl/wrkwin.hxx"
#include "vcl/cvtgrf.hxx" #include "vcl/cvtgrf.hxx"
#include "vcl/idle.hxx"
#include "vcl/image.hxx" #include "vcl/image.hxx"
#include "vcl/settings.hxx" #include "vcl/settings.hxx"
#include "vcl/unowrap.hxx" #include "vcl/unowrap.hxx"
...@@ -387,6 +388,7 @@ void DeInitVCL() ...@@ -387,6 +388,7 @@ void DeInitVCL()
if ( pSVData->maAppData.mpIdleMgr ) if ( pSVData->maAppData.mpIdleMgr )
delete pSVData->maAppData.mpIdleMgr; delete pSVData->maAppData.mpIdleMgr;
Timer::ImplDeInitTimer(); Timer::ImplDeInitTimer();
Idle::ImplDeInitIdle;
if ( pSVData->maWinData.mpMsgBoxImgList ) if ( pSVData->maWinData.mpMsgBoxImgList )
{ {
......
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