diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-09 11:33:52 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 20:10:00 +0100 |
commit | eabaca0cf1382242c6f68084ece93e35cd8fab04 (patch) | |
tree | 033dbe93bf8bb7e024661c7cae67c6330c5cb057 /include/vcl/dialog.hxx | |
parent | 1798a4433280a6cae38fe535fb043a8e27d7f95a (diff) |
vcl:compilerplugin: new rule, no passing of vcl::Window by VclPtr
to prevent problems with accidentally deleting an object by doing this:
Button *pButton = new Button(NULL);
...
pButton->callAMethodThatTakesARef(pButton);
Since we take a ref as we construct a temporary VclReference<> - but
this will dispose & delete the pButton as we return to the frame doing
the callAMethod
Change-Id: I60fc211b27fe7ff463aa58f1da106f430fc65529
Diffstat (limited to 'include/vcl/dialog.hxx')
-rw-r--r-- | include/vcl/dialog.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index ab498f1183b3..95afb6acdbf4 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -76,8 +76,8 @@ protected: protected: friend class VclBuilder; - void set_action_area(const VclPtr<VclButtonBox> &xBox); - void set_content_area(const VclPtr<VclBox> &xBox); + void set_action_area(VclButtonBox* pBox); + void set_content_area(VclBox* pBox); public: explicit Dialog( vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG ); |