Skip to content

Commit

Permalink
QDateTime: Fix inline use of deprecated ctor
Browse files Browse the repository at this point in the history
FTBFS with clang-cl. Errors out due to no conversion between
TimeSpec and TimeZone.

Solution is simple: the default is LocalTime, so drop the 3rd argument.

Change-Id: I27307f72680836b0a142aa49e5e9653996a0b2fc
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Konrad Kujawa <[email protected]>
  • Loading branch information
Morten242 committed Feb 9, 2023
1 parent da8fa2d commit 08ea2c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/time/qdatetime.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ class Q_CORE_EXPORT QDateTime
QT_POST_CXX17_API_IN_EXPORTED_CLASS
static QDateTime fromStdLocalTime(const std::chrono::local_time<std::chrono::milliseconds> &time)
{
QDateTime result(QDate(1970, 1, 1), QTime(0, 0, 0), Qt::LocalTime);
QDateTime result(QDate(1970, 1, 1), QTime(0, 0, 0));
return result.addMSecs(time.time_since_epoch().count());
}

Expand Down

0 comments on commit 08ea2c5

Please sign in to comment.