[Libreoffice-commits] core.git: cui/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Jun 21 06:27:13 UTC 2018


 cui/source/options/optinet2.cxx |    5 ++---
 cui/source/options/optinet2.hxx |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 6e6059599c70d8cba88afa0f3d9a43bea42ea4e1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Jun 20 15:42:37 2018 +0200

    loplugin:useuniqueptr in SvxSecurityTabPage
    
    Change-Id: I36fc9076e2190e37bf002a384ee503442c5781df
    Reviewed-on: https://gerrit.libreoffice.org/56191
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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;


More information about the Libreoffice-commits mailing list