From d0be1ef82ecd3ab6a8195fd9bceeecfa470877f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 28 Sep 2010 10:44:07 +0200 Subject: 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) --- src/gui/dialogs/qprintdialog_mac.mm | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/gui') 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(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 -- cgit v1.2.1