diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-04 23:20:57 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-06 07:14:11 +0000 |
commit | 4fcbf856049e56f916d1044fa8cd7e3759a87079 (patch) | |
tree | 9b460df87df3a68acac5cd45444f4807ea52bad4 | |
parent | cc813c946c2fdb2e050db773572431a537e37215 (diff) |
tdf#89329: use unique_ptr for pImpl in dialog
Change-Id: Ic08e35a08f3f72383be305e3458b83fe06e3e1a5
Reviewed-on: https://gerrit.libreoffice.org/25902
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | include/vcl/dialog.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index 3aa38f543802..9c0774712e31 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -37,7 +37,7 @@ public: private: VclPtr<Dialog> mpPrevExecuteDlg; - DialogImpl* mpDialogImpl; + std::unique_ptr<DialogImpl> mpDialogImpl; long mnMousePositioned; bool mbInExecute; bool mbInClose; diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index b3b39ae9a29a..30f051fda227 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -362,7 +362,7 @@ void Dialog::ImplInitDialogData() mpContentArea.clear(); mpActionArea.clear(); mnMousePositioned = 0; - mpDialogImpl = new DialogImpl; + mpDialogImpl.reset(new DialogImpl); } void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag ) @@ -583,8 +583,7 @@ Dialog::~Dialog() void Dialog::dispose() { - delete mpDialogImpl; - mpDialogImpl = nullptr; + mpDialogImpl.reset(); mpPrevExecuteDlg.clear(); mpActionArea.clear(); mpContentArea.clear(); |