Disambiguate a QDateTime construction
When compiling removed_api.cpp, both the removed QDateTime(QDate, QTime) constructor and the one taking a transition resolution with a default are visible. The inline fromStdLocalTime() was thus ambiguous as to which it was calling. So make the transition resolution overt. Fixes: QTBUG-125079 Change-Id: I0c498bed2831afee0adc41c4575f3ed1bc244122 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 669f7e3b9723446732d31d48b653cd2bd9580f2d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
43877ca81a
commit
dcc482cd01
@ -529,7 +529,7 @@ public:
|
|||||||
QT_POST_CXX17_API_IN_EXPORTED_CLASS
|
QT_POST_CXX17_API_IN_EXPORTED_CLASS
|
||||||
static QDateTime fromStdLocalTime(const std::chrono::local_time<std::chrono::milliseconds> &time)
|
static QDateTime fromStdLocalTime(const std::chrono::local_time<std::chrono::milliseconds> &time)
|
||||||
{
|
{
|
||||||
QDateTime result(QDate(1970, 1, 1), QTime(0, 0, 0));
|
QDateTime result(QDate(1970, 1, 1), QTime(0, 0, 0), TransitionResolution::LegacyBehavior);
|
||||||
return result.addMSecs(time.time_since_epoch().count());
|
return result.addMSecs(time.time_since_epoch().count());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user