Ivan Solovev ffac33964d Add std::format support for qfloat16
The qfloat16 formatter is based of the std::formatter<float>. It is
added in a separate header file qfloat16format.h, so that the users
could include it only when they really need.

After the C++20 standard was released, it had one important addition
that requires the format string to be parsed at compile-time.
This feature is covered by __cpp_lib_format == 202106L.
The older implementations have slightly different signatures of
std::formatter::format() and std::formatter::parse() methods.
To avoid ugly macros, Qt only supports std::format if the compilers
implement __cpp_lib_format >= 202106L.

This commit also defines QT_SUPPORTS_STD_FORMAT macro to avoid
constant repetition of

  if (defined(__cpp_lib_format) && (__cpp_lib_format >= 202106L))

checks.

[ChangeLog][QtCore][qfloat16] Added std::format support for qfloat16.
The supported formatting options are similar to those of std::formatter
for float.

Fixes: QTBUG-104654
Change-Id: I3a0b077a55fbb46573de8b7bcd288b4ef9541953
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-06-05 16:39:44 +02:00
..
2024-06-05 16:39:44 +02:00
2024-05-29 08:18:06 +10:00

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.