Kaydet (Commit) e1b922a2 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in frm::ODatabaseForm

Change-Id: I55a0ee19476d1e656cd9ff82d44666d43ba4ca58
Reviewed-on: https://gerrit.libreoffice.org/56189
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 10433ad9
...@@ -2528,7 +2528,7 @@ void SAL_CALL ODatabaseForm::disposing(const EventObject& Source) ...@@ -2528,7 +2528,7 @@ void SAL_CALL ODatabaseForm::disposing(const EventObject& Source)
void ODatabaseForm::impl_createLoadTimer() void ODatabaseForm::impl_createLoadTimer()
{ {
OSL_PRECOND( m_pLoadTimer == nullptr, "ODatabaseForm::impl_createLoadTimer: timer already exists!" ); OSL_PRECOND( m_pLoadTimer == nullptr, "ODatabaseForm::impl_createLoadTimer: timer already exists!" );
m_pLoadTimer = new Timer("DatabaseFormLoadTimer"); m_pLoadTimer.reset(new Timer("DatabaseFormLoadTimer"));
m_pLoadTimer->SetTimeout(100); m_pLoadTimer->SetTimeout(100);
m_pLoadTimer->SetInvokeHandler(LINK(this,ODatabaseForm,OnTimeout)); m_pLoadTimer->SetInvokeHandler(LINK(this,ODatabaseForm,OnTimeout));
} }
...@@ -2558,7 +2558,7 @@ void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/) ...@@ -2558,7 +2558,7 @@ void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/)
if ( m_pLoadTimer && m_pLoadTimer->IsActive() ) if ( m_pLoadTimer && m_pLoadTimer->IsActive() )
m_pLoadTimer->Stop(); m_pLoadTimer->Stop();
DELETEZ( m_pLoadTimer ); m_pLoadTimer.reset();
Reference< XRowSet > xParentRowSet( m_xParent, UNO_QUERY_THROW ); Reference< XRowSet > xParentRowSet( m_xParent, UNO_QUERY_THROW );
xParentRowSet->removeRowSetListener( this ); xParentRowSet->removeRowSetListener( this );
...@@ -2849,7 +2849,7 @@ void SAL_CALL ODatabaseForm::unload() ...@@ -2849,7 +2849,7 @@ void SAL_CALL ODatabaseForm::unload()
if (!isLoaded()) if (!isLoaded())
return; return;
DELETEZ(m_pLoadTimer); m_pLoadTimer.reset();
aGuard.clear(); aGuard.clear();
EventObject aEvt(static_cast<XWeak*>(this)); EventObject aEvt(static_cast<XWeak*>(this));
......
...@@ -177,7 +177,7 @@ class ODatabaseForm :public OFormComponents ...@@ -177,7 +177,7 @@ class ODatabaseForm :public OFormComponents
rtl::Reference<OGroupManager> m_pGroupManager; rtl::Reference<OGroupManager> m_pGroupManager;
::dbtools::ParameterManager m_aParameterManager; ::dbtools::ParameterManager m_aParameterManager;
::dbtools::FilterManager m_aFilterManager; ::dbtools::FilterManager m_aFilterManager;
Timer* m_pLoadTimer; std::unique_ptr<Timer> m_pLoadTimer;
rtl::Reference<OFormSubmitResetThread> m_pThread; rtl::Reference<OFormSubmitResetThread> m_pThread;
OUString m_sCurrentErrorContext; OUString m_sCurrentErrorContext;
......
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