diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-05-08 10:29:45 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-09 01:36:09 +0200 |
commit | cf48eded4dc0e6c860b48a1d756b5920ffc6a724 (patch) | |
tree | 257d329f30bdea003c09fd3ff842686485d8f2de /src/plugins | |
parent | f280efc6201adf8933c9d48a1d5b6983ee9fed9b (diff) |
Don't leak native dialog resources
Have QDialog::~QDialog() call deleteNativeDialog_sys() on the helpers,
so that we don't risk leaking any resources allocated in the helper.
QFileDialog does this now, but not QColorDialog or QFontDialog. The
Cocoa plugin worked around this problem by calling
deleteNativeDialog_sys() itself, but the Windows plugin does not do
this, resulting in leaks.
Change-Id: I380d87c95686c8f3cb260f9242299be27329280d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | 4 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm index 9f4446b32e..45c36b4e1e 100644 --- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm @@ -343,9 +343,7 @@ QCocoaColorDialogHelper::QCocoaColorDialogHelper() : } QCocoaColorDialogHelper::~QCocoaColorDialogHelper() -{ - deleteNativeDialog_sys(); -} +{ } void QCocoaColorDialogHelper::platformNativeDialogModalHelp() { diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index 515bc2a6ee..5f39531503 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -362,9 +362,7 @@ QCocoaFontDialogHelper::QCocoaFontDialogHelper() : } QCocoaFontDialogHelper::~QCocoaFontDialogHelper() -{ - deleteNativeDialog_sys(); -} +{ } void QCocoaFontDialogHelper::platformNativeDialogModalHelp() { |