Kaydet (Commit) 447d4e13 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in PrintDialog

Change-Id: Ia40e48b2e57624bb59bc0dcc0927bf673581081d
Reviewed-on: https://gerrit.libreoffice.org/53346Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 07098076
...@@ -168,7 +168,7 @@ namespace vcl ...@@ -168,7 +168,7 @@ namespace vcl
void storeToSettings(); void storeToSettings();
}; };
VclBuilder* mpCustomOptionsUIBuilder; std::unique_ptr<VclBuilder> mpCustomOptionsUIBuilder;
std::shared_ptr<PrinterController> maPController; std::shared_ptr<PrinterController> maPController;
VclPtr<TabControl> mpTabCtrl; VclPtr<TabControl> mpTabCtrl;
......
...@@ -798,7 +798,7 @@ PrintDialog::~PrintDialog() ...@@ -798,7 +798,7 @@ PrintDialog::~PrintDialog()
void PrintDialog::dispose() void PrintDialog::dispose()
{ {
delete mpCustomOptionsUIBuilder; mpCustomOptionsUIBuilder.reset();
mpTabCtrl.clear(); mpTabCtrl.clear();
mpPreviewWindow.clear(); mpPreviewWindow.clear();
mpPageEdit.clear(); mpPageEdit.clear();
...@@ -908,8 +908,7 @@ void PrintDialog::setupOptionalUI() ...@@ -908,8 +908,7 @@ void PrintDialog::setupOptionalUI()
vcl::Window *pCustom = get<vcl::Window>("customcontents"); vcl::Window *pCustom = get<vcl::Window>("customcontents");
delete mpCustomOptionsUIBuilder; mpCustomOptionsUIBuilder.reset(new VclBuilder(pCustom, getUIRootDir(), sOptionsUIFile));
mpCustomOptionsUIBuilder = new VclBuilder(pCustom, getUIRootDir(), sOptionsUIFile);
vcl::Window *pWindow = mpCustomOptionsUIBuilder->get_widget_root(); vcl::Window *pWindow = mpCustomOptionsUIBuilder->get_widget_root();
pWindow->Show(); pWindow->Show();
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment