diff options
author | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-11-17 12:36:23 +0000 |
---|---|---|
committer | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-12-09 12:34:59 +0000 |
commit | ab14edefdcc264381e3746bb7910f79043de77e6 (patch) | |
tree | 921d183e413e02d4d281ea49c6b8647001e3a393 /svtools/source | |
parent | fixed timer, idle bug (diff) | |
download | core-ab14edefdcc264381e3746bb7910f79043de77e6.tar.gz core-ab14edefdcc264381e3746bb7910f79043de77e6.zip |
changed Timer tp idle
Change-Id: Ia3e76239ba98530547e057bebfda767ad684730b
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/control/asynclink.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index 57550e851deb..1efd93497048 100644 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.cxx @@ -46,7 +46,7 @@ bAllowDoubles { _pArg = pObj; DBG_ASSERT( bAllowDoubles || - ( !_nEventId && ( !_pTimer || !_pTimer->IsActive() ) ), + ( !_nEventId && ( !_pIdle || !_pIdle->IsActive() ) ), "Schon ein Call unterwegs" ); if( _nEventId ) { @@ -54,17 +54,17 @@ bAllowDoubles Application::RemoveUserEvent( _nEventId ); if( _pMutex ) _pMutex->release(); } - if( _pTimer )_pTimer->Stop(); + if( _pIdle )_pIdle->Stop(); if( bUseTimer ) { - if( !_pTimer ) + if( !_pIdle ) { - _pTimer = new Timer; - _pTimer->SetTimeout( 0 ); - _pTimer->SetTimeoutHdl( STATIC_LINK( + _pIdle = new Idle; + _pIdle->SetPriority( VCL_IDLE_PRIORITY_HIGHEST ); + _pIdle->SetIdleHdl( STATIC_LINK( this, AsynchronLink, HandleCall) ); } - _pTimer->Start(); + _pIdle->Start(); } else { @@ -81,7 +81,7 @@ AsynchronLink::~AsynchronLink() { Application::RemoveUserEvent( _nEventId ); } - delete _pTimer; + delete _pIdle; if( _pDeleted ) *_pDeleted = true; delete _pMutex; } @@ -104,7 +104,7 @@ void AsynchronLink::ClearPendingCall() _nEventId = 0; } if( _pMutex ) _pMutex->release(); - if( _pTimer ) _pTimer->Stop(); + if( _pIdle ) _pIdle->Stop(); } void AsynchronLink::Call_Impl( void* pArg ) |