dbaccess/source/ui/dlg/detailpages.cxx |   16 +++++++++++-----
 dbaccess/source/ui/dlg/detailpages.hxx |    3 ++-
 2 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit 09dfad2098d1737c0519c8ad74dd67b4292e73d1
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Aug 2 10:43:27 2019 +0100
Commit:     Xisco Faulí <xiscofa...@libreoffice.org>
CommitDate: Wed Oct 30 09:23:42 2019 +0100

    dispose MySQLNativePage
    
    Reviewed-on: https://gerrit.libreoffice.org/76854
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit 2598f8a127c6ce2ec85a0d1ae1b1c706951e4e9d)
    
    Change-Id: I2506d08b8c2e5b501bccb8b5ef2e6d829a912852
    Reviewed-on: https://gerrit.libreoffice.org/81683
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org>

diff --git a/dbaccess/source/ui/dlg/detailpages.cxx 
b/dbaccess/source/ui/dlg/detailpages.cxx
index a9c19e8d2e27..9a47c1b73ba1 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -502,7 +502,7 @@ namespace dbaui
     MySQLNativePage::MySQLNativePage(TabPageParent pParent, const SfxItemSet& 
rCoreAttrs)
         : OCommonBehaviourTabPage(pParent, "dbaccess/ui/mysqlnativepage.ui", 
"MysqlNativePage", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
         , 
m_xMySQLSettingsContainer(m_xBuilder->weld_widget("MySQLSettingsContainer"))
-        , m_aMySQLSettings(m_xMySQLSettingsContainer.get(), 
LINK(this,OGenericAdministrationPage,OnControlModified))
+        , m_xMySQLSettings(new 
DBMySQLNativeSettings(m_xMySQLSettingsContainer.get(), 
LINK(this,OGenericAdministrationPage,OnControlModified)))
         , m_xSeparator1(m_xBuilder->weld_label("connectionheader"))
         , m_xSeparator2(m_xBuilder->weld_label("userheader"))
         , m_xUserNameLabel(m_xBuilder->weld_label("usernamelabel"))
@@ -512,6 +512,12 @@ namespace dbaui
         
m_xUserName->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
     }
 
+    void MySQLNativePage::dispose()
+    {
+        m_xMySQLSettings.reset();
+        OCommonBehaviourTabPage::dispose();
+    }
+
     MySQLNativePage::~MySQLNativePage()
     {
         disposeOnce();
@@ -520,7 +526,7 @@ namespace dbaui
     void MySQLNativePage::fillControls(std::vector< 
std::unique_ptr<ISaveValueWrapper> >& _rControlList)
     {
         OCommonBehaviourTabPage::fillControls( _rControlList );
-        m_aMySQLSettings.fillControls( _rControlList );
+        m_xMySQLSettings->fillControls( _rControlList );
 
         _rControlList.emplace_back(new 
OSaveValueWidgetWrapper<weld::Entry>(m_xUserName.get()));
         _rControlList.emplace_back(new 
OSaveValueWidgetWrapper<weld::CheckButton>(m_xPasswordRequired.get()));
@@ -529,7 +535,7 @@ namespace dbaui
     void MySQLNativePage::fillWindows(std::vector< 
std::unique_ptr<ISaveValueWrapper> >& _rControlList)
     {
         OCommonBehaviourTabPage::fillWindows( _rControlList );
-        m_aMySQLSettings.fillWindows( _rControlList);
+        m_xMySQLSettings->fillWindows( _rControlList);
 
         _rControlList.emplace_back(new 
ODisableWidgetWrapper<weld::Label>(m_xSeparator1.get()));
         _rControlList.emplace_back(new 
ODisableWidgetWrapper<weld::Label>(m_xSeparator2.get()));
@@ -540,7 +546,7 @@ namespace dbaui
     {
         bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet( _rSet );
 
-        bChangedSomething |= m_aMySQLSettings.FillItemSet( _rSet );
+        bChangedSomething |= m_xMySQLSettings->FillItemSet( _rSet );
 
         if (m_xUserName->get_value_changed_from_saved())
         {
@@ -558,7 +564,7 @@ namespace dbaui
         bool bValid, bReadonly;
         getFlags(_rSet, bValid, bReadonly);
 
-        m_aMySQLSettings.implInitControls( _rSet );
+        m_xMySQLSettings->implInitControls( _rSet );
 
         const SfxStringItem* pUidItem = 
_rSet.GetItem<SfxStringItem>(DSID_USER);
         const SfxBoolItem* pAllowEmptyPwd = 
_rSet.GetItem<SfxBoolItem>(DSID_PASSWORDREQUIRED);
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx 
b/dbaccess/source/ui/dlg/detailpages.hxx
index 8de9f2f3e757..ffb8d96cec12 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -194,11 +194,12 @@ namespace dbaui
     {
     public:
         MySQLNativePage(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
+        virtual void dispose() override;
         virtual ~MySQLNativePage() override;
 
     private:
         std::unique_ptr<weld::Widget> m_xMySQLSettingsContainer;
-        DBMySQLNativeSettings m_aMySQLSettings;
+        std::unique_ptr<DBMySQLNativeSettings> m_xMySQLSettings;
         std::unique_ptr<weld::Label> m_xSeparator1;
         std::unique_ptr<weld::Label> m_xSeparator2;
         std::unique_ptr<weld::Label> m_xUserNameLabel;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to