QMessageBox: cut out the _q_requireVersion() middle-man

Just de-inline the original function instead of merely moving its
implementation into an out-of-line function.

Amends 408fbd3f2d7a6b87521f5b3c27ecf6341dc06e13.

Change-Id: I6860a10e0a7d876ce1837f196b1fb4165779540a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 91efd6116665bd71f7932adcf7a589204c239276)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2023-06-21 07:56:49 +02:00 committed by Qt Cherry-pick Bot
parent 11e0a4fc5e
commit 2df17d56b9
2 changed files with 2 additions and 7 deletions

View File

@ -2847,7 +2847,7 @@ void QMessageBoxPrivate::helperDone(QDialog::DialogCode code, QPlatformDialogHel
clickedButton = button;
}
Q_WIDGETS_EXPORT void _q_requireVersion(int argc, char *argv[], QAnyStringView req)
void qRequireVersion(int argc, char *argv[], QAnyStringView req)
{
const auto required = QVersionNumber::fromString(req).normalized();
const auto current = QVersionNumber::fromString(qVersion()).normalized();

View File

@ -312,12 +312,7 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QMessageBox::StandardButtons)
[[maybe_unused]]
static inline void qRequireVersion(int argc, char *argv[], QAnyStringView req)
{
Q_WIDGETS_EXPORT void _q_requireVersion(int, char *[], QAnyStringView);
_q_requireVersion(argc, argv, req);
}
Q_WIDGETS_EXPORT void qRequireVersion(int argc, char *argv[], QAnyStringView req);
#define QT_REQUIRE_VERSION(argc, argv, str) qRequireVersion(argc, argv, str);