Remove dead code in QMessageBox

Remove code guarded by #ifdef 0

Task-number: QTBUG-115832
Change-Id: I7d1dfd3dca2d8cda455d73f90dc2ae142ea41118
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b2f4e1e395bba4b72d5e1d5cc6e4469b97731a65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Axel Spoerl 2023-08-31 09:17:55 +02:00 committed by Qt Cherry-pick Bot
parent f4d0320f45
commit a93a41fcd1

View File

@ -1942,12 +1942,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
// should perhaps be a style hint // should perhaps be a style hint
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
oldMsgBox = msgBox; oldMsgBox = msgBox;
#if 0
// ### doesn't work until close button is enabled in title bar
msgBox->d_func()->autoAddOkButton = false;
#else
msgBox->d_func()->buttonBox->setCenterButtons(true); msgBox->d_func()->buttonBox->setCenterButtons(true);
#endif
msgBox->setModal(false); msgBox->setModal(false);
msgBox->show(); msgBox->show();
#else #else
@ -2028,12 +2023,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
// should perhaps be a style hint // should perhaps be a style hint
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
oldMsgBox = msgBox; oldMsgBox = msgBox;
#if 0
// ### doesn't work until close button is enabled in title bar
msgBox->d_func()->autoAddOkButton = false;
#else
msgBox->d_func()->buttonBox->setCenterButtons(true); msgBox->d_func()->buttonBox->setCenterButtons(true);
#endif
msgBox->setModal(false); msgBox->setModal(false);
msgBox->show(); msgBox->show();
#else #else