From 46009c851764857e67202875cea7d4566bf6abeb Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Sun, 10 Nov 2024 23:01:07 +0100 Subject: vcl: Return unique_ptr in weld::MessageDialog::weld_message_area The returned weld::Container* (but not the associated toolkit widget) is owned by the caller. Make that more obvious by returning a unique_ptr instead of a raw pointer. This is also consistent with what other methods returning instances for which the caller takes over ownership (like weld::Widget::weld_parent) do, whereas e.g. weld::Notebook::get_page returns a weld::Container* that is owned by the weld::Notebook instance, not the caller. Change-Id: Ia839fac90ea93b9ac6be5819aa4bb3261a775f33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176363 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/vcl/weld.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index cc338544fe3f..ea918ec111fd 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -645,7 +645,7 @@ public: virtual OUString get_primary_text() const = 0; virtual void set_secondary_text(const OUString& rText) = 0; virtual OUString get_secondary_text() const = 0; - virtual Container* weld_message_area() = 0; + virtual std::unique_ptr weld_message_area() = 0; }; class VCL_DLLPUBLIC Assistant : virtual public Dialog -- cgit v1.2.3