summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-09-28 10:44:07 +0200
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 13:06:59 +0300
commitd0be1ef82ecd3ab6a8195fd9bceeecfa470877f9 (patch)
tree70a2c348891fd06a2aa38e9c7230389a33cc913a
parent88c5ba9203a74fb24407530848ab46a8e1a27724 (diff)
downloadqt4-tools-d0be1ef82ecd3ab6a8195fd9bceeecfa470877f9.tar.gz
Fixed crash when using Qt::WA_DeleteOnClose on a QPrintDialog on Mac.
The Qt::WA_DeleteOnClose bug was fixed some time ago, while this workaround was "forgotten" in the QPrintDialog code. It actually causes a crash and is no longer necessary. Task-number: QTBUG-11430 Reviewed-by: Prasanth (cherry picked from commit 165dbe2615bf4b908e6bc84bb8963ca72fe5f866)
-rw-r--r--src/gui/dialogs/qprintdialog_mac.mm9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/gui/dialogs/qprintdialog_mac.mm b/src/gui/dialogs/qprintdialog_mac.mm
index 21ae21e234..f9fbf8daca 100644
--- a/src/gui/dialogs/qprintdialog_mac.mm
+++ b/src/gui/dialogs/qprintdialog_mac.mm
@@ -140,11 +140,6 @@ QT_USE_NAMESPACE
QPrintDialogPrivate *d = static_cast<QPrintDialogPrivate *>(contextInfo);
QPrintDialog *dialog = d->printDialog();
- // temporary hack to work around bug in deleteLater() in Qt/Mac Cocoa
-#if 1
- bool deleteDialog = dialog->testAttribute(Qt::WA_DeleteOnClose);
- dialog->setAttribute(Qt::WA_DeleteOnClose, false);
-#endif
if (returnCode == NSOKButton) {
UInt32 frompage, topage;
@@ -192,10 +187,6 @@ QT_USE_NAMESPACE
}
dialog->done((returnCode == NSOKButton) ? QDialog::Accepted : QDialog::Rejected);
-#if 1
- if (deleteDialog)
- delete dialog;
-#endif
}
@end