[Libreoffice-commits] core.git: forms/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu Jun 21 06:25:20 UTC 2018
forms/source/component/DatabaseForm.cxx | 6 +++---
forms/source/component/DatabaseForm.hxx | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit e1b922a2b302879747ffb93d3a463f2e4d8eca71
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Jun 20 15:30:27 2018 +0200
loplugin:useuniqueptr in frm::ODatabaseForm
Change-Id: I55a0ee19476d1e656cd9ff82d44666d43ba4ca58
Reviewed-on: https://gerrit.libreoffice.org/56189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index c434543fbace..a191db5d0d42 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -2528,7 +2528,7 @@ void SAL_CALL ODatabaseForm::disposing(const EventObject& Source)
void ODatabaseForm::impl_createLoadTimer()
{
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->SetInvokeHandler(LINK(this,ODatabaseForm,OnTimeout));
}
@@ -2558,7 +2558,7 @@ void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/)
if ( m_pLoadTimer && m_pLoadTimer->IsActive() )
m_pLoadTimer->Stop();
- DELETEZ( m_pLoadTimer );
+ m_pLoadTimer.reset();
Reference< XRowSet > xParentRowSet( m_xParent, UNO_QUERY_THROW );
xParentRowSet->removeRowSetListener( this );
@@ -2849,7 +2849,7 @@ void SAL_CALL ODatabaseForm::unload()
if (!isLoaded())
return;
- DELETEZ(m_pLoadTimer);
+ m_pLoadTimer.reset();
aGuard.clear();
EventObject aEvt(static_cast<XWeak*>(this));
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx
index 211cf216c68d..920a1b8ead21 100644
--- a/forms/source/component/DatabaseForm.hxx
+++ b/forms/source/component/DatabaseForm.hxx
@@ -177,7 +177,7 @@ class ODatabaseForm :public OFormComponents
rtl::Reference<OGroupManager> m_pGroupManager;
::dbtools::ParameterManager m_aParameterManager;
::dbtools::FilterManager m_aFilterManager;
- Timer* m_pLoadTimer;
+ std::unique_ptr<Timer> m_pLoadTimer;
rtl::Reference<OFormSubmitResetThread> m_pThread;
OUString m_sCurrentErrorContext;
More information about the Libreoffice-commits
mailing list