summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-01 09:58:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-05 07:30:01 +0100
commit4516546b9efeeaa7cffe608fca8b544230aee3f1 (patch)
treecb6e61643df6cd29bf3ffcb7e8b0ed1fd5d97f6f /desktop/source
parent28799d303c84c7ec76c657043c7394ceec4b8416 (diff)
loplugin:useuniqueptr in TheExtensionManager
Change-Id: Ic45feadb64410b3f7833edd52af118436cd9763d Reviewed-on: https://gerrit.libreoffice.org/50715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx7
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.hxx4
2 files changed, 4 insertions, 7 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index b9dd8cd947f5..ca84148ec7de 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -104,7 +104,6 @@ TheExtensionManager::~TheExtensionManager()
{
m_pUpdReqDialog.disposeAndClear();
m_pExtMgrDialog.disposeAndClear();
- delete m_pExecuteCmdQueue;
}
@@ -117,8 +116,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
if ( !m_pUpdReqDialog )
{
m_pUpdReqDialog = VclPtr<UpdateRequiredDialog>::Create( nullptr, this );
- delete m_pExecuteCmdQueue;
- m_pExecuteCmdQueue = new ExtensionCmdQueue( m_pUpdReqDialog.get(), this, m_xContext );
+ m_pExecuteCmdQueue.reset( new ExtensionCmdQueue( m_pUpdReqDialog.get(), this, m_xContext ) );
createPackageList();
}
}
@@ -128,8 +126,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( VCLUnoHelper::GetWindow(m_xParent), this );
else
m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( nullptr, this, Dialog::InitFlag::NoParent );
- delete m_pExecuteCmdQueue;
- m_pExecuteCmdQueue = new ExtensionCmdQueue( m_pExtMgrDialog.get(), this, m_xContext );
+ m_pExecuteCmdQueue.reset( new ExtensionCmdQueue( m_pExtMgrDialog.get(), this, m_xContext ) );
m_pExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL );
createPackageList();
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
index 3437249efd81..5db21a5a40ca 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -55,7 +55,7 @@ private:
css::uno::Reference< css::awt::XWindow > m_xParent;
VclPtr<ExtMgrDialog> m_pExtMgrDialog;
VclPtr<UpdateRequiredDialog> m_pUpdReqDialog;
- ExtensionCmdQueue *m_pExecuteCmdQueue;
+ std::unique_ptr<ExtensionCmdQueue> m_pExecuteCmdQueue;
OUString m_sGetExtensionsURL;
bool m_bModified;
@@ -85,7 +85,7 @@ public:
return m_pExtMgrDialog.get();
return m_pUpdReqDialog.get();
}
- ExtensionCmdQueue* getCmdQueue() const { return m_pExecuteCmdQueue; }
+ ExtensionCmdQueue* getCmdQueue() const { return m_pExecuteCmdQueue.get(); }
void SetText( const OUString &rTitle );
void Show();