From 7c70e69511817127aa4691339af4a6aa07c1502a Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 2 Dec 2009 12:40:50 +0200 Subject: Fixed crash on Symbian when using QProgressDialog::setCancelButton(0). The crash occured since d->cancelAction is child of d->cancelButton, which is essentially same as d->cancel pointer. Due to parent/child relationship, deleting d->cancel deleted also chilren including cancelAction. Then explicitly deleting already deleted d->cancelAction (dangling pointer) caused KERN-EXEC 3 crash. There is no need to delete d->cancelAction since it is deleted via parent/child relationship. Task-number: QTBUG-6109 Reviewed-by: Miikka Heikkinen --- src/gui/dialogs/qprogressdialog.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gui/dialogs/qprogressdialog.cpp b/src/gui/dialogs/qprogressdialog.cpp index f5024bb..98b15e9 100644 --- a/src/gui/dialogs/qprogressdialog.cpp +++ b/src/gui/dialogs/qprogressdialog.cpp @@ -424,10 +424,6 @@ void QProgressDialog::setCancelButton(QPushButton *cancelButton) { Q_D(QProgressDialog); delete d->cancel; -#ifdef QT_SOFTKEYS_ENABLED - delete d->cancelAction; - d->cancelAction = 0; -#endif d->cancel = cancelButton; if (cancelButton) { if (cancelButton->parentWidget() == this) { -- cgit v0.12