summaryrefslogtreecommitdiffstats
path: root/examples/widgets/draganddrop/draggableicons/main.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-05-24 14:32:47 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-06-01 08:00:13 +0000
commit1752308123b38b95ef15264a514294b19e94f9d3 (patch)
tree241b09e5cf5b0f4c93f8c0e59cb81eb93a37b542 /examples/widgets/draganddrop/draggableicons/main.cpp
parent8d6ed7acf12703c4276ab861365e3daadbbcff90 (diff)
QDateTime::fromStdTimePoint: fix a call to fromMSecsSinceEpoch6.7
The overload taking a Qt::TimeSpec is deprecated; we need to use the one taking a QTimeZone instead. However I can't just use QTimeZone because this is inline code in qdatetime.h, and QTimeZone is only forward declared there. Moving the definition in qtimezone.h is possible (like it's done for zoned_time), but that is a source break (requires a new inclusion from users) and also weird (this function doesn't deal with timezones, why do we need to include qtimezone.h?). Instead, just add another overload of fromStdTimePoint that takes precisely sys_time<milliseconds>. As such, it can be always available even in C++17, and implemented out-of-line. Even if this is a new symbol, the new commit policy allows the backport. I also don't think this qualifies as a new feature; it's a cleanup that we forgot to do (if we had a C++20-enabled configuration in the CI when we also did the fromMSecsSinceEpoch deprecation, we would've caught this). Pick-to: 6.5 Change-Id: Ica77da291be4bcda2ffc7c164316a2977974c386 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit c4fc3a74b4525ad5d80e558707301a12e4d4cb19) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/widgets/draganddrop/draggableicons/main.cpp')
0 files changed, 0 insertions, 0 deletions