summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-10 23:01:07 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-11 01:51:55 +0100
commit46009c851764857e67202875cea7d4566bf6abeb (patch)
treecf32f088f4c60a58712a435412b35bd289a3daa9 /include
parent774786a019090b357fffa4008f562988d10b2c8f (diff)
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<weld::Container> 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 <m.weghorn@posteo.de>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/weld.hxx2
1 files changed, 1 insertions, 1 deletions
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<Container> weld_message_area() = 0;
};
class VCL_DLLPUBLIC Assistant : virtual public Dialog