summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-08 14:09:13 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 20:03:21 +0100
commit1798a4433280a6cae38fe535fb043a8e27d7f95a (patch)
treeb08acb0329cd59ffcf18466b4efe30406ef421a0 /vcl
parenta6acccc6d2e6a49691d2612af9898e4018c68861 (diff)
compilerplugin: check that necessary Window subclasses have a dispose method
i.e. the ones that declare any VclPtr fields Change-Id: I7adfc3b3b190a2ede60bfccd08f85a269fae33ca
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/combobox.cxx6
-rw-r--r--vcl/source/window/dialog.cxx7
-rw-r--r--vcl/source/window/layout.cxx6
3 files changed, 19 insertions, 0 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index d84797564a68..21877ecbaf99 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -78,6 +78,12 @@ ComboBox::~ComboBox()
delete mpBtn;
}
+void ComboBox::dispose()
+{
+ mpSubEdit.disposeAndClear();
+ Edit::dispose();
+}
+
void ComboBox::ImplInitComboBoxData()
{
mpSubEdit.disposeAndClear();
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index b5f7b5361f12..60aa87618f44 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -542,6 +542,13 @@ Dialog::~Dialog()
mpDialogImpl = NULL;
}
+void Dialog::dispose()
+{
+ mpActionArea.disposeAndClear();
+ mpContentArea.disposeAndClear();
+ SystemWindow::dispose();
+}
+
IMPL_LINK_NOARG(Dialog, ImplAsyncCloseHdl)
{
Close();
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 6a6c15408fe9..5fee1f0f1bd8 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1878,6 +1878,12 @@ void VclEventBox::Command(const CommandEvent&)
//discard events by default to block them reaching children
}
+void VclEventBox::dispose()
+{
+ m_aEventBoxHelper.disposeAndClear();
+ VclBin::dispose();
+}
+
void VclSizeGroup::trigger_queue_resize()
{
//sufficient to trigger one widget to trigger all of them