[Libreoffice-commits] core.git: include/vcl vcl/qa vcl/README.lifecycle vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Oct 19 15:34:21 UTC 2019


 include/vcl/dialog.hxx       |   15 ---------------
 vcl/README.lifecycle         |    4 ++--
 vcl/qa/cppunit/lifecycle.cxx |    2 +-
 vcl/source/window/dialog.cxx |    5 -----
 4 files changed, 3 insertions(+), 23 deletions(-)

New commits:
commit 66df14370e9e2d633369b446954d2a0bc0064ab6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 18 16:47:23 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 19 17:33:33 2019 +0200

    drop unused ModalDialog class
    
    Change-Id: I3186b63d4c6c437ff0c0653a6b6c7fd61ae69304
    Reviewed-on: https://gerrit.libreoffice.org/81069
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 5e4398546d04..15827443ba45 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -166,21 +166,6 @@ public:
     vcl::Window*    get_widget_for_response(int nResponse);
 };
 
-class VCL_DLLPUBLIC ModalDialog : public Dialog
-{
-public:
-    explicit        ModalDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
-
-protected:
-    using Window::Show;
-    using Window::Hide;
-
-private:
-
-    SAL_DLLPRIVATE         ModalDialog (const ModalDialog &) = delete;
-    SAL_DLLPRIVATE         ModalDialog & operator= (const ModalDialog &) = delete;
-};
-
 #endif // INCLUDED_VCL_DIALOG_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/README.lifecycle b/vcl/README.lifecycle
index c7dc05812b03..a309b65ef9ea 100644
--- a/vcl/README.lifecycle
+++ b/vcl/README.lifecycle
@@ -308,11 +308,11 @@ ways and often both.
 	Window that has already been destroyed. This can easily
 	happen via this sort of pattern:
 
-	ModalDialog *pDlg = VclPtr<ModalDialog>(nullptr /* parent */);
+	Dialog *pDlg = VclPtr<Dialog>(nullptr /* parent */);
 	// by here the pDlg quite probably points to free'd memory...
 
 	It is necessary in these cases to ensure that the *pDlg is
-	a VclPtr<ModalDialog> instead.
+	a VclPtr<Dialog> instead.
 
 ** It crashes with some invalid memory #2...
 
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx
index 5b97c0114962..51d90776bb44 100644
--- a/vcl/qa/cppunit/lifecycle.cxx
+++ b/vcl/qa/cppunit/lifecycle.cxx
@@ -297,7 +297,7 @@ void LifecycleTest::testLeakage()
         aObjects.push_back(LeakTestObject::Create<VclVButtonBox>(xVBox));
     }
 
-    aObjects.push_back(LeakTestObject::Create<ModalDialog>(xParent, "PrintProgressDialog", "vcl/ui/printprogressdialog.ui"));
+    aObjects.push_back(LeakTestObject::Create<Dialog>(xParent, "PrintProgressDialog", "vcl/ui/printprogressdialog.ui"));
     xParent.clear();
 
     for (auto i = aObjects.rbegin(); i != aObjects.rend(); ++i)
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index fcb40df71d7a..f0c54aef9b9c 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1517,11 +1517,6 @@ VclBuilderContainer::~VclBuilderContainer()
 {
 }
 
-ModalDialog::ModalDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription ) :
-    Dialog(pParent, rID, rUIXMLDescription, WindowType::MODALDIALOG, InitFlag::Default)
-{
-}
-
 void Dialog::Activate()
 {
     if (GetType() == WindowType::MODELESSDIALOG)


More information about the Libreoffice-commits mailing list