summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qmessagebox.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-09-17 16:07:10 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-09-23 16:57:03 +0200
commit298e41b830f60c0f2f078996ace77a4254a9f335 (patch)
tree4bf6029da36fb143aeeb11c04a2bdf442ef56b42 /src/widgets/dialogs/qmessagebox.cpp
parente5d65996a93bbf4cbc8a155887def6efa3ad73de (diff)
Remove fatuously true or false QT_VERSION checks
QT_VERSION is now at least QT_VERSION_CHECK(6, 3, 0), so remove all checks against Qt 6.0.0 or earlier. They are superfluous. Tidied up in some places in the process, particularly #include order. Change-Id: I2636b2fd13be5b976f5b043ef2f8cddc038a72a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/dialogs/qmessagebox.cpp')
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index a6a4d588d3..09c14f1ec1 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -1934,33 +1934,7 @@ static QMessageBox::StandardButton newButton(int button)
if (button == QMessageBox::NoButton || (button & NewButtonMask))
return QMessageBox::StandardButton(button & QMessageBox::ButtonMask);
-#if QT_VERSION < 0x050000
- // this is needed for binary compatibility with Qt 4.0 and 4.1
- switch (button & Old_ButtonMask) {
- case Old_Ok:
- return QMessageBox::Ok;
- case Old_Cancel:
- return QMessageBox::Cancel;
- case Old_Yes:
- return QMessageBox::Yes;
- case Old_No:
- return QMessageBox::No;
- case Old_Abort:
- return QMessageBox::Abort;
- case Old_Retry:
- return QMessageBox::Retry;
- case Old_Ignore:
- return QMessageBox::Ignore;
- case Old_YesAll:
- return QMessageBox::YesToAll;
- case Old_NoAll:
- return QMessageBox::NoToAll;
- default:
- return QMessageBox::NoButton;
- }
-#else
return QMessageBox::NoButton;
-#endif
}
static bool detectedCompat(int button0, int button1, int button2)