[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - include/vcl vcl/qa vcl/README.lifecycle

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Jun 2 15:35:21 UTC 2019


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

New commits:
commit 02ee2f40d5825d3acc1d442bfc16dc9f7348ddd0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jun 1 21:53:32 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jun 2 17:34:44 2019 +0200

    no direct ModelessDialog instantiation left
    
    Change-Id: If31cf3c02ab714f45ebbc0139e0e77102b5eb2ba
    Reviewed-on: https://gerrit.libreoffice.org/73342
    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 2b3b1f29f2e6..3748dbd943d5 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -188,7 +188,7 @@ class VCL_DLLPUBLIC ModelessDialog : public Dialog
                     ModelessDialog (const ModelessDialog &) = delete;
                     ModelessDialog & operator= (const ModelessDialog &) = delete;
 
-public:
+protected:
     explicit        ModelessDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, Dialog::InitFlag eFlag = Dialog::InitFlag::Default );
 };
 
diff --git a/vcl/README.lifecycle b/vcl/README.lifecycle
index dc6286210780..d9d186425b64 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:
 
-	ModelessDialog *pDlg = VclPtr<ModelessDialog>(nullptr /* parent */);
+	ModalDialog *pDlg = VclPtr<ModalDialog>(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<ModelessDialog> instead.
+	a VclPtr<ModalDialog> instead.
 
 ** It crashes with some invalid memory #2...
 
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx
index 118114736c6a..98db6704e28a 100644
--- a/vcl/qa/cppunit/lifecycle.cxx
+++ b/vcl/qa/cppunit/lifecycle.cxx
@@ -299,7 +299,6 @@ void LifecycleTest::testLeakage()
         aObjects.push_back(LeakTestObject::Create<VclVButtonBox>(xVBox));
     }
 
-    aObjects.push_back(LeakTestObject::Create<ModelessDialog>(xParent, "PrintProgressDialog", "vcl/ui/printprogressdialog.ui"));
     aObjects.push_back(LeakTestObject::Create<ModalDialog>(xParent, "PrintProgressDialog", "vcl/ui/printprogressdialog.ui"));
     xParent.clear();
 


More information about the Libreoffice-commits mailing list