diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 14:42:23 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:17:00 +0100 |
commit | 00f2787a4a68633206635743298926bf2e65a8fa (patch) | |
tree | efc3a4f02b3d8acd69d25071499be5a475cb0338 /vcl/workben | |
parent | b3dcb2996b70caabda1939c9e85545c97d78404a (diff) |
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133
Conflicts:
sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/outdevgrind.cxx | 4 | ||||
-rw-r--r-- | vcl/workben/svdem.cxx | 6 | ||||
-rw-r--r-- | vcl/workben/svpclient.cxx | 6 | ||||
-rw-r--r-- | vcl/workben/svptest.cxx | 7 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 6 |
5 files changed, 15 insertions, 14 deletions
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index 72869d1d507a..cf7a0d0ea8a2 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -898,8 +898,8 @@ sal_uInt16 GrindApp::Exception( sal_uInt16 nError ) int GrindApp::Main() { - TestWindow aWindow; - aWindow.Execute(); + VclPtr<TestWindow> aWindow(new TestWindow); + aWindow->Execute(); return 0; } diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx index a06bf5cc13d7..6b2e233f9c78 100644 --- a/vcl/workben/svdem.cxx +++ b/vcl/workben/svdem.cxx @@ -81,9 +81,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText(OUString("VCL - Workbench")); - aMainWin.Show(); + VclPtr<MyWin> aMainWin(new MyWin(NULL, WB_APP | WB_STDWORK) ); + aMainWin->SetText(OUString("VCL - Workbench")); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index 708efb9144d3..7bbcdf2144f0 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -120,9 +120,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_STDWORK ); - aMainWin.SetText( OUString( "SvpClient" ) ); - aMainWin.Show(); + VclPtr<MyWin> aMainWin(new MyWin(NULL, WB_STDWORK) ); + aMainWin->SetText( OUString( "SvpClient" ) ); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index ebf716c3abd1..ea6988633d94 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -34,6 +34,7 @@ #include <vcl/bitmap.hxx> #include <vcl/bmpacc.hxx> #include <vcl/metric.hxx> +#include <vcl/vclptr.hxx> #include <rtl/ustrbuf.hxx> @@ -90,9 +91,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText( OUString( "VCL - Workbench" ) ); - aMainWin.Show(); + VclPtr<MyWin> aMainWin(new MyWin(NULL, WB_APP | WB_STDWORK) ); + aMainWin->SetText( OUString( "VCL - Workbench" ) ); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 9860d7d20c84..14a57805beae 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1609,18 +1609,18 @@ public: } } - DemoWin aMainWin(aRenderer, bThreads); + VclPtr<DemoWin> aMainWin(new DemoWin(aRenderer, bThreads)); std::unique_ptr<DemoWidgets> xWidgets; std::unique_ptr<DemoPopup> xPopup; - aMainWin.SetText("Interactive VCL demo #1"); + aMainWin->SetText("Interactive VCL demo #1"); if (bWidgets) xWidgets.reset(new DemoWidgets()); else if (bPopup) xPopup.reset(new DemoPopup()); else - aMainWin.Show(); + aMainWin->Show(); Application::Execute(); } |