qt5base-lts/tests
Giuseppe D'Angelo 7de83f06c1 QDateTime: add conversions for time_point and zoned_time
In C++20, QDateTime is a direct equivalent of a sys_time<milliseconds>
time point. (Before, it might not have been, because system_clock before
C++20 was not guaranteed to be tracking Unix time, AKA UTC time without
leap seconds.) To be specific, sys_time<milliseconds> corresponds to
a QDateTime using the Qt::UTC timespec.

This patch:

1) adds named constructors taking time_points:

* a generic one taking any time_point convertible (via clock_cast) to
  a system_clock (this obviously includes system_clock, but also e.g.
  utc_clock)

* another couple taking local_time, interpreted as a duration from
  1/1/1970 in local time.

2) adds a named constructor from zoned_time (i.e. a sys_time + a
   timezone), that we can easily support via QTimeZone.

3) add conversion functions towards sys_time, matching the existing
   to(M)SecsSinceEpoch() functions.

[ChangeLog][QtCore][QDateTime] QDateTime can now be constructed
from std::chrono::time_point objects (including local_time), as
well as from std::chrono::zoned_time objects. Moreover, they
can be converted to std::chrono::time_point using system_clock
as their clock.

Change-Id: Ic6409bde43bc3e745d9df6257e0a77157472352d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-13 18:45:54 +02:00
..
auto QDateTime: add conversions for time_point and zoned_time 2022-04-13 18:45:54 +02:00
baseline Improve surface format request for baseline test of GL painter 2022-04-06 12:44:40 +02:00
benchmarks benchmarks: fix deprecation warnings 2022-04-06 12:44:40 +02:00
global
libfuzzer Fuzzing: Add fuzzer for QJsonDocument::fromJson 2022-01-17 09:46:40 +01:00
manual wasm: make rasterwindow use non-deprecated API 2022-04-12 19:33:35 +01:00
shared tst_qstring: properly fix the build when LC_MEASUREMENTS is not defined 2022-02-24 15:45:53 -08:00
testserver CI: QNX qemu need docker service ports explicitly defined for visibility 2022-03-21 22:30:01 +02:00
CMakeLists.txt
README

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.