diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-12-02 10:40:50 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-12-02 10:41:20 (GMT) |
commit | 7c70e69511817127aa4691339af4a6aa07c1502a (patch) | |
tree | 80b434ad2b10233e0668f3f23121617f747b3af9 /src/gui | |
parent | 1b6c1054c1ad8f99665ceaa958da01b1383a3e34 (diff) | |
download | Qt-7c70e69511817127aa4691339af4a6aa07c1502a.zip Qt-7c70e69511817127aa4691339af4a6aa07c1502a.tar.gz Qt-7c70e69511817127aa4691339af4a6aa07c1502a.tar.bz2 |
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
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/qprogressdialog.cpp | 4 |
1 files changed, 0 insertions, 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) { |