diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-20 11:27:10 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 12:37:44 +0100 |
commit | 61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch) | |
tree | 77a28e38763bc5f9d95e2c278601d31dc6fbf65d /vcl/source/app | |
parent | f1d9eef4163e88a3cb6360178b52ce441e65d8ae (diff) |
vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly.
Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
Diffstat (limited to 'vcl/source/app')
-rw-r--r-- | vcl/source/app/dbggui.cxx | 6 | ||||
-rw-r--r-- | vcl/source/app/stdtext.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/svdata.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 852220922cda..f3ebc74b2ea0 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -354,7 +354,7 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton ) } if( (aData.nTestFlags & ~IMMEDIATE_FLAGS) != (pData->nTestFlags & ~IMMEDIATE_FLAGS) ) { - VclPtr<MessageDialog> aBox(new MessageDialog(this, OUString( + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, OUString( "Some of the changed settings will only be active after " "restarting the process"), VCL_MESSAGE_INFO)); aBox->Execute(); @@ -369,7 +369,7 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & HelpEventMode::CONTEXT ) { - VclPtr<DbgInfoDialog> aInfoDialog(new DbgInfoDialog( this, true ) ); + ScopedVclPtr<DbgInfoDialog> aInfoDialog(new DbgInfoDialog( this, true ) ); OUString aHelpText; const sal_Char** pHelpStrs = pDbgHelpText; while ( *pHelpStrs ) @@ -833,7 +833,7 @@ void DbgGUIStart() if ( pData ) { - VclPtr<DbgDialog> pDialog(new DbgDialog); + ScopedVclPtr<DbgDialog> pDialog(new DbgDialog); // we switch off dialog tests for the debug dialog sal_uLong nOldFlags = pData->nTestFlags; pData->nTestFlags &= ~DBG_TEST_DIALOG; diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx index ca3ee6bbc566..dcd8c9e69ffb 100644 --- a/vcl/source/app/stdtext.cxx +++ b/vcl/source/app/stdtext.cxx @@ -39,7 +39,7 @@ void ShowServiceNotAvailableError(vcl::Window* pParent, { OUString aText = GetStandardText(STANDARD_TEXT_SERVICE_NOT_AVAILABLE). replaceAll("%s", rServiceName); - VclPtr<MessageDialog> aBox(new MessageDialog(pParent, aText, bError ? VCL_MESSAGE_ERROR : VCL_MESSAGE_WARNING)); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(pParent, aText, bError ? VCL_MESSAGE_ERROR : VCL_MESSAGE_WARNING)); aBox->Execute(); } diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index bd33350e7a10..b8563c518654 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -172,7 +172,7 @@ ResMgr* ImplGetResMgr() "Missing vcl resource. This indicates that files vital to localization are missing. " "You might have a corrupt installation."; fprintf( stderr, "%s\n", pMsg ); - VclPtr<MessageDialog> aBox(new MessageDialog(NULL, OUString(pMsg, strlen(pMsg), RTL_TEXTENCODING_ASCII_US))); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(NULL, OUString(pMsg, strlen(pMsg), RTL_TEXTENCODING_ASCII_US))); aBox->Execute(); } } |