diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-23 19:37:51 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-23 20:49:05 +0100 |
commit | bf110d40efcc79efb9247fdce5d2f54bafa6550b (patch) | |
tree | 4e9fad96d91adfd5159b009b430a64d4a6863bd6 /desktop | |
parent | 75d8b305bbc1c2377f23361ecd64816a350baa4c (diff) |
Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:
1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
2. split the inheritance of Idle from Timer again to maintain
different Link<>s and move all common code into a TimerBase.
While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.
And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.
It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).
Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 8 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.hxx | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 0fe6ba610e29..2048994f72e0 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -528,7 +528,7 @@ Desktop::Desktop() , m_aBootstrapStatus(BS_OK) { m_firstRunTimer.SetTimeout(3000); // 3 sec. - m_firstRunTimer.SetTimeoutHdl(LINK(this, Desktop, AsyncInitFirstRun)); + m_firstRunTimer.SetInvokeHandler(LINK(this, Desktop, AsyncInitFirstRun)); m_firstRunTimer.SetDebugName( "desktop::Desktop m_firstRunTimer" ); } @@ -2583,7 +2583,7 @@ void Desktop::CloseSplashScreen() } -IMPL_STATIC_LINK(Desktop, AsyncInitFirstRun, Timer *, /*unused*/, void) +IMPL_STATIC_LINK_NOARG(Desktop, AsyncInitFirstRun, Timer *, void) { // does initializations which are necessary for the first run of the office try diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 04a025984b5e..e81ff2c6734e 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -522,7 +522,7 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager, #endif m_aIdle.SetPriority(TaskPriority::LOWEST); - m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) ); + m_aIdle.SetInvokeHandler( LINK( this, ExtMgrDialog, TimeOutHdl ) ); } @@ -948,7 +948,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn, Button*, void) #endif } -IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl, Idle *, void) +IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl, Timer *, void) { if ( m_bStopProgress ) { @@ -1066,7 +1066,7 @@ UpdateRequiredDialog::UpdateRequiredDialog(vcl::Window *pParent, TheExtensionMan m_pCloseBtn->GrabFocus(); m_aIdle.SetPriority( TaskPriority::LOWEST ); - m_aIdle.SetIdleHdl( LINK( this, UpdateRequiredDialog, TimeOutHdl ) ); + m_aIdle.SetInvokeHandler( LINK( this, UpdateRequiredDialog, TimeOutHdl ) ); } UpdateRequiredDialog::~UpdateRequiredDialog() @@ -1258,7 +1258,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleCloseBtn, Button*, void) } -IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl, Idle *, void) +IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl, Timer *, void) { if ( m_bStopProgress ) { diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 0f0b54f4b261..8019edc9d330 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -143,7 +143,7 @@ class ExtMgrDialog : public ModelessDialog, DECL_LINK( HandleCancelBtn, Button*, void ); DECL_LINK( HandleCloseBtn, Button*, void ); DECL_LINK( HandleExtTypeCbx, Button*, void ); - DECL_LINK(TimeOutHdl, Idle *, void); + DECL_LINK(TimeOutHdl, Timer *, void); DECL_LINK( startProgress, void *, void ); DECL_STATIC_LINK( ExtMgrDialog, Restart, void *, void ); @@ -216,7 +216,7 @@ class UpdateRequiredDialog : public ModalDialog, DECL_LINK( HandleUpdateBtn, Button*, void ); DECL_LINK( HandleCloseBtn, Button*, void ); DECL_LINK( HandleCancelBtn, Button*, void ); - DECL_LINK(TimeOutHdl, Idle *, void); + DECL_LINK(TimeOutHdl, Timer *, void); DECL_LINK( startProgress, void *, void ); static bool isEnabled( const css::uno::Reference< css::deployment::XPackage > &xPackage ); |