summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qromancalendar_p.h
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-07-19 13:14:12 +0200
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-08-06 19:46:18 +0200
commitd0ae1ef33a6eed02acde7304298794f4f0119e16 (patch)
treed5666dd8c391635bc2c2728d8a36285cb7c82768 /src/corelib/time/qromancalendar_p.h
parentf84adba1023d019e54d82b1479d9b8d33eff6729 (diff)
QCalendar: Thread-safe calendar backend registration
All calendar backend accounting was moved into QCalendarRegistry class (renamed from Registry). Calendar backends are no longer registered inside constructors, because in multithreaded environment this may lead to incompletely initialized instances becoming visible via QCalendar API in multithreaded environment. All system backends are registered by QCalendarRegistry itself when they are needed. New method QCalendarBackend::registerCustomBackend() is provided to register any 3rd-party calendar backends. Registration by names was also simplified. The list of names is now passed to QCalendarBackend::registerCustomBackend(). The checks are provided to ensure that all system backends have non-conflicting names. Name conflicts for custom backends are resolved in favor of earlier registered backends, as it is already the case in the existing code. The documentation was updated to reflect that. Method QCalendarBackend::names() was added to query the list of names associated with a backend after it is registered. Calendar backend deregistration was completely removed because it is not possible to perform it safely without reference counting. Fixes: QTBUG-93004 Pick-to: 6.2 Change-Id: I0ab1eccc02fdd1e1c66b5e5dd076c93de32d5a49 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/time/qromancalendar_p.h')
-rw-r--r--src/corelib/time/qromancalendar_p.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/corelib/time/qromancalendar_p.h b/src/corelib/time/qromancalendar_p.h
index 4ba699ffa6..4bf5b8eb84 100644
--- a/src/corelib/time/qromancalendar_p.h
+++ b/src/corelib/time/qromancalendar_p.h
@@ -69,9 +69,6 @@ protected:
// locale support:
const QCalendarLocale *localeMonthIndexData() const override;
const char16_t *localeMonthData() const override;
- // (The INTEGRITY compiler got upset at: using QCalendarBackend:QCalendarBackend;)
- QRomanCalendar(const QString &name, QCalendar::System id = QCalendar::System::User)
- : QCalendarBackend(name, id) {}
};
QT_END_NAMESPACE