include/vcl/weld.hxx             |    2 +-
 vcl/inc/qt5/QtInstanceDialog.hxx |    2 +-
 vcl/inc/salvtables.hxx           |    2 +-
 vcl/qt5/QtInstanceDialog.cxx     |    2 +-
 vcl/source/app/salvtables.cxx    |    4 ++--
 vcl/unx/gtk3/gtkinst.cxx         |    6 +++---
 6 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 719bb5c7197fecf11b89f4c503aae6b3ef3b99fe
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Sun Nov 10 23:31:33 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Nov 11 09:34:46 2024 +0100

    vcl: Return unique_ptr in weld::Dialog::weld_content_area
    
    This is effectively the weld::Dialog equivalent of
    
        Change-Id: Ia839fac90ea93b9ac6be5819aa4bb3261a775f33
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Sun Nov 10 23:01:07 2024 +0100
    
            vcl: Return unique_ptr in weld::MessageDialog::weld_message_area
    
    Change-Id: I3eee2d3617c3576b442a5578090cd5de53e17f33
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176365
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index ea918ec111fd..effe46665612 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -627,7 +627,7 @@ public:
     virtual void add_button(const OUString& rText, int response, const 
OUString& rHelpId = {}) = 0;
     virtual void set_default_response(int response) = 0;
     virtual Button* weld_widget_for_response(int response) = 0;
-    virtual Container* weld_content_area() = 0;
+    virtual std::unique_ptr<weld::Container> weld_content_area() = 0;
 
     // shrink the dialog down to shown just these widgets
     virtual void collapse(weld::Widget* pEdit, weld::Widget* pButton) = 0;
diff --git a/vcl/inc/qt5/QtInstanceDialog.hxx b/vcl/inc/qt5/QtInstanceDialog.hxx
index f4ed8d4423c8..06b61ab1e179 100644
--- a/vcl/inc/qt5/QtInstanceDialog.hxx
+++ b/vcl/inc/qt5/QtInstanceDialog.hxx
@@ -55,7 +55,7 @@ public:
 
     virtual void set_default_response(int) override;
 
-    virtual weld::Container* weld_content_area() override;
+    virtual std::unique_ptr<weld::Container> weld_content_area() override;
 
     static void handleButtonClick(QDialog& rDialog, QAbstractButton& rButton);
 
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index e6341e4b87ed..196be2c4193a 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -555,7 +555,7 @@ public:
 
     virtual void set_default_response(int nResponse) override;
 
-    virtual weld::Container* weld_content_area() override;
+    virtual std::unique_ptr<weld::Container> weld_content_area() override;
 };
 
 class SalInstanceAssistant : public SalInstanceDialog, public virtual 
weld::Assistant
diff --git a/vcl/qt5/QtInstanceDialog.cxx b/vcl/qt5/QtInstanceDialog.cxx
index b33701e3dec6..e20515f89068 100644
--- a/vcl/qt5/QtInstanceDialog.cxx
+++ b/vcl/qt5/QtInstanceDialog.cxx
@@ -146,7 +146,7 @@ weld::Button* 
QtInstanceDialog::weld_widget_for_response(int)
 
 void QtInstanceDialog::set_default_response(int) { assert(false && "Not 
implemented yet"); }
 
-weld::Container* QtInstanceDialog::weld_content_area()
+std::unique_ptr<weld::Container> QtInstanceDialog::weld_content_area()
 {
     assert(false && "Not implemented yet");
     return nullptr;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index c7cf6877271c..4f3ba515d13a 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1941,9 +1941,9 @@ void SalInstanceDialog::set_default_response(int 
nResponse)
     m_xDialog->set_default_response(nResponse);
 }
 
-weld::Container* SalInstanceDialog::weld_content_area()
+std::unique_ptr<weld::Container> SalInstanceDialog::weld_content_area()
 {
-    return new SalInstanceContainer(m_xDialog->get_content_area(), m_pBuilder, 
false);
+    return 
std::make_unique<SalInstanceContainer>(m_xDialog->get_content_area(), 
m_pBuilder, false);
 }
 
 IMPL_LINK(SalInstanceDialog, PopupScreenShotMenuHdl, const CommandEvent&, 
rCEvt, bool)
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 66a7995fcaf9..70d595ef3dba 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -7184,12 +7184,12 @@ public:
 
     virtual weld::Button* weld_widget_for_response(int nVclResponse) override;
 
-    virtual Container* weld_content_area() override
+    virtual std::unique_ptr<weld::Container> weld_content_area() override
     {
 #if !GTK_CHECK_VERSION(4, 0, 0)
-        return new 
GtkInstanceContainer(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(m_pDialog))),
 m_pBuilder, false);
+        return 
std::make_unique<GtkInstanceContainer>(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(m_pDialog))),
 m_pBuilder, false);
 #else
-        return new 
GtkInstanceContainer(gtk_dialog_get_content_area(GTK_DIALOG(m_pDialog)), 
m_pBuilder, false);
+        return 
std::make_unique<GtkInstanceContainer>(gtk_dialog_get_content_area(GTK_DIALOG(m_pDialog)),
 m_pBuilder, false);
 #endif
     }
 

Reply via email to