Edward Welbourne 9b6a585f71 QTimeZone: short-cut the empty-name case for the system zone and its id
The systemTimeZoneId() delegated to systemTimeZone() in a way that
worked - but wasn't easy to follow - in the case where the backend's
systemTimeZoneId() failed but its default constructor succeeds. This
went via the QTimeZone(id) constructor, relying on its handling of
empty id (which gets the system zone, unlike the default constructor
which gets an invalid zone). When it gets an empty id, it falls back
to newBackendTimeZone(), which uses the default constructor of the
backend; and we have (and are even accessing the backend methods via)
a default-constructed backend, so can simply share that with
global_tz. This, if nothing else, saves repeating the systemTimeZone()
look-up for the system ID when delegated to by systemTimeZoneId().

There's a risk that this might miss a change to the system
configuration since the global_tz was initialized, but it's only used
in a fallback and backends tend to cache this information anyway. When
we come to address QTBUG-56899, we can have the refresh function
update the global_tz object.

Change-Id: I8541e74f378e92af5a2a7187a49a9eb14a66c744
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2068645f07ab9108fc54fa2c499b1b2661a35bfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-16 11:15:43 +00:00
2024-02-29 15:35:57 +01:00
2024-07-12 01:42:29 +00:00
2024-09-19 07:20:47 +03:00
2024-02-02 15:23:02 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%