summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qtimezoneprivate_p.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-11-03 11:51:20 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2023-11-06 20:50:44 +0100
commitbe55fbede9ed7a283d769fd5cf15a3a56bdcfcf7 (patch)
treef434107a443fb93d327cb6f6c1ef939c51a56cef /src/corelib/time/qtimezoneprivate_p.h
parentc88211d1e4ac12eb2ae4990703a4f73c7085d624 (diff)
QTZ/Darwin: Make available-ID checks cheaper
Previously we've checked whether an ID is available by computing the full list of all known available IDs (converting each from NSString to QBA in the process) in order to compare the offered ID to each of those in turn. This is a significant performance bottle-neck Simply trying to construct the NSTimeZone instance should suffice to determine whether there is such a zone; if the ID is not available, we apparently get back a null pointer, which is easy enough to test for. Pick-to: 6.6 6.5 Fixes: QTBUG-118759 Change-Id: Ib272c96e25db9640490299c638e2e9196a58712f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/time/qtimezoneprivate_p.h')
-rw-r--r--src/corelib/time/qtimezoneprivate_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/time/qtimezoneprivate_p.h b/src/corelib/time/qtimezoneprivate_p.h
index 8085247953..4942ecd477 100644
--- a/src/corelib/time/qtimezoneprivate_p.h
+++ b/src/corelib/time/qtimezoneprivate_p.h
@@ -366,7 +366,7 @@ public:
Data previousTransition(qint64 beforeMSecsSinceEpoch) const override;
QByteArray systemTimeZoneId() const override;
-
+ bool isTimeZoneIdAvailable(const QByteArray &ianaId) const override;
QList<QByteArray> availableTimeZoneIds() const override;
NSTimeZone *nsTimeZone() const;