diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-20 15:42:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-21 08:26:47 +0200 |
commit | 6e6059599c70d8cba88afa0f3d9a43bea42ea4e1 (patch) | |
tree | 0a7ec8734865103f07b1f735f604bc9883ae9e0f /cui | |
parent | 48c4460d414dd6f60c630af2fc13e1c3db2c3653 (diff) |
loplugin:useuniqueptr in SvxSecurityTabPage
Change-Id: I36fc9076e2190e37bf002a384ee503442c5781df
Reviewed-on: https://gerrit.libreoffice.org/56191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optinet2.cxx | 5 | ||||
-rw-r--r-- | cui/source/options/optinet2.hxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index bf7f6bd26737..0971cb0b68e7 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -621,8 +621,7 @@ SvxSecurityTabPage::~SvxSecurityTabPage() void SvxSecurityTabPage::dispose() { - delete mpSecOptions; - mpSecOptions = nullptr; + mpSecOptions.reset(); mpCertPathDlg.disposeAndClear(); m_xSecOptDlg.reset(); m_pSecurityOptionsPB.clear(); @@ -644,7 +643,7 @@ void SvxSecurityTabPage::dispose() IMPL_LINK_NOARG(SvxSecurityTabPage, SecurityOptionsHdl, Button*, void) { if (!m_xSecOptDlg) - m_xSecOptDlg.reset(new svx::SecurityOptionsDialog(GetFrameWeld(), mpSecOptions)); + m_xSecOptDlg.reset(new svx::SecurityOptionsDialog(GetFrameWeld(), mpSecOptions.get())); (void)m_xSecOptDlg->run(); } diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index 19f27affdbb4..f7af792d2199 100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -126,7 +126,7 @@ private: VclPtr<VclContainer> m_pTSAURLsFrame; VclPtr<PushButton> m_pTSAURLsPB; - SvtSecurityOptions* mpSecOptions; + std::unique_ptr<SvtSecurityOptions> mpSecOptions; std::unique_ptr<svx::SecurityOptionsDialog> m_xSecOptDlg; VclPtr<CertPathDialog> mpCertPathDlg; |