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:
parent
11e0a4fc5e
commit
2df17d56b9
@ -2847,7 +2847,7 @@ void QMessageBoxPrivate::helperDone(QDialog::DialogCode code, QPlatformDialogHel
|
|||||||
clickedButton = button;
|
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 required = QVersionNumber::fromString(req).normalized();
|
||||||
const auto current = QVersionNumber::fromString(qVersion()).normalized();
|
const auto current = QVersionNumber::fromString(qVersion()).normalized();
|
||||||
|
@ -312,12 +312,7 @@ private:
|
|||||||
|
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QMessageBox::StandardButtons)
|
Q_DECLARE_OPERATORS_FOR_FLAGS(QMessageBox::StandardButtons)
|
||||||
|
|
||||||
[[maybe_unused]]
|
Q_WIDGETS_EXPORT void qRequireVersion(int argc, char *argv[], QAnyStringView req);
|
||||||
static inline void qRequireVersion(int argc, char *argv[], QAnyStringView req)
|
|
||||||
{
|
|
||||||
Q_WIDGETS_EXPORT void _q_requireVersion(int, char *[], QAnyStringView);
|
|
||||||
_q_requireVersion(argc, argv, req);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define QT_REQUIRE_VERSION(argc, argv, str) qRequireVersion(argc, argv, str);
|
#define QT_REQUIRE_VERSION(argc, argv, str) qRequireVersion(argc, argv, str);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user