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/widgets/dialogs/qdialog_p.h | |
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/widgets/dialogs/qdialog_p.h')
-rw-r--r-- | src/widgets/dialogs/qdialog_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qdialog_p.h b/src/widgets/dialogs/qdialog_p.h index 8c53d6a404..7b02f359dd 100644 --- a/src/widgets/dialogs/qdialog_p.h +++ b/src/widgets/dialogs/qdialog_p.h @@ -84,6 +84,7 @@ public: QWindow *parentWindow() const; bool setNativeDialogVisible(bool visible); QVariant styleHint(QPlatformDialogHelper::StyleHint hint) const; + void deleteNativeDialog(); QPointer<QPushButton> mainDef; Qt::Orientation orientation; |