diff options
author | Marc Mutz <marc.mutz@qt.io> | 2024-02-09 17:25:18 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2024-02-12 17:52:58 +0100 |
commit | 7862453ba9cbcb601b9aad59dd821ae49661de4a (patch) | |
tree | d0e43a9ffd1ac4393c545685e5719969d04fd5c4 | |
parent | 4e9017c1fc6b80a24871481f0c33dcc88a69d9d6 (diff) |
QTzTimeZoneCache: make findEntry() static
It doesn't need access to the members, so making it static both saves
the implicit this pointer, and communicates to the reader that this is
function doesn't access other QTzTimeZoneCache members.
In particular, it proves that it doesn't really need to be called with
m_mutex locked, cf. QTBUG-122138.
Task-number: QTBUG-122138
Pick-to: 6.7 6.6 6.5
Change-Id: I28c99be8d066c1647aaf7aa256b6400a6dd92955
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/time/qtimezoneprivate_tz.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp index 66c69781c6..7d1655b88f 100644 --- a/src/corelib/time/qtimezoneprivate_tz.cpp +++ b/src/corelib/time/qtimezoneprivate_tz.cpp @@ -783,7 +783,7 @@ public: QTzTimeZoneCacheEntry fetchEntry(const QByteArray &ianaId); private: - QTzTimeZoneCacheEntry findEntry(const QByteArray &ianaId); + static QTzTimeZoneCacheEntry findEntry(const QByteArray &ianaId); QCache<QByteArray, QTzTimeZoneCacheEntry> m_cache; QMutex m_mutex; }; |