From 91f48cc4b77b1cfb5a4490c3bed3eb97edd2f85a Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 2 Aug 2024 11:09:02 +0200 Subject: [PATCH] Fix #if-ery on QDate::stdSysDaysToJulianDay() It relies on QT6_CALL_NEW_OVERLOAD_TAIL hence on QT6_ONLY, which is inactive in bootstrap builds (they're treated as Qt 7). Thanks to Ahmad Samir for reporting the resulting compiler warning at API change review. Amends commit 88702cc87cf830b145c8bff5174748e3719364f9 Pick-to: 6.8 6.7 Task-number: QTBUG-125859 Change-Id: I3472d3bd489f16175d04ef6198522b060fa6150a Reviewed-by: Ivan Solovev --- src/corelib/time/qdatetime.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/time/qdatetime.h b/src/corelib/time/qdatetime.h index 282731578e8..a0d8affea0e 100644 --- a/src/corelib/time/qdatetime.h +++ b/src/corelib/time/qdatetime.h @@ -195,12 +195,12 @@ private: return unixEpochJd() + epochDays; } -#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) +#if QT_VERSION_MAJOR < 7 && !defined(QT_BOOTSTRAPPED) static constexpr qint64 stdSysDaysToJulianDay(const std::chrono::sys_days &days) noexcept { return stdSysDaysToJulianDay(days QT6_CALL_NEW_OVERLOAD_TAIL); } -#endif // QT_VERSION < QT_VERSION_CHECK(7, 0, 0) +#endif // Qt < 7 and not bootstrapped #endif // __cpp_lib_chrono >= 201907L qint64 jd;