From cf48eded4dc0e6c860b48a1d756b5920ffc6a724 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Tue, 8 May 2012 10:29:45 +0200 Subject: 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 --- src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | 4 +--- src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/plugins') 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() { -- cgit v1.2.3