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/qfiledialog_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/qfiledialog_p.h')
-rw-r--r-- | src/widgets/dialogs/qfiledialog_p.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h index a66ee757f6..4283842b1d 100644 --- a/src/widgets/dialogs/qfiledialog_p.h +++ b/src/widgets/dialogs/qfiledialog_p.h @@ -244,7 +244,6 @@ public: // dialog. Returning false means that a non-native dialog must be // used instead. bool canBeNativeDialog(); - void deleteNativeDialog_sys(); QDialog::DialogCode dialogResultCode_sys(); void setDirectory_sys(const QString &directory); @@ -347,15 +346,6 @@ inline QString QFileDialogPrivate::rootPath() const { return model->rootPath(); } -// Dummies for platforms that don't use native dialogs: -inline void QFileDialogPrivate::deleteNativeDialog_sys() -{ - if (QPlatformFileDialogHelper *helper = platformFileDialogHelper()) { - helper->deleteNativeDialog_sys(); - nativeDialogInUse = false; - } -} - inline QDialog::DialogCode QFileDialogPrivate::dialogResultCode_sys() { QDialog::DialogCode result = QDialog::Rejected; |