summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qcalendarbackend_p.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-10-05 13:39:45 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-12-04 15:09:46 +0100
commit2b7c74d5ff7e835ffa76ed3c80b05cf73af40f4f (patch)
tree7d3b62e14342ae8105d9b73bc3e458341b67471c /src/corelib/time/qcalendarbackend_p.h
parent94c3c7a491e0c25cf2179efe04c2fbd80b370c1c (diff)
Enable testing for whether a calendar registered its primary name
In registerAlias(), return true if this instance is already registered with the given name. Previously there was no way for a QCalendarBackend to tell whether its primary name registration had succeeded, during instantiation (other than by devious hackery using a QCalendar instance with the name and some form of back-channel in the instance). Use this in backendFromEnum() to catch cases in which (e.g. due to a race condition) a new instance isn't the one that got registered. Pick-to: 6.0 5.15 Change-Id: I468ac364a68bf3574cd7f8b8b1e672d8fd969111 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/time/qcalendarbackend_p.h')
-rw-r--r--src/corelib/time/qcalendarbackend_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/time/qcalendarbackend_p.h b/src/corelib/time/qcalendarbackend_p.h
index 129e86494b..d7a1b773cc 100644
--- a/src/corelib/time/qcalendarbackend_p.h
+++ b/src/corelib/time/qcalendarbackend_p.h
@@ -133,7 +133,7 @@ public:
static QStringList availableCalendars();
protected:
- QCalendarBackend(const QString &name, QCalendar::System id = QCalendar::System::User);
+ QCalendarBackend(const QString &name, QCalendar::System system = QCalendar::System::User);
// Locale support:
virtual const QCalendarLocale *localeMonthIndexData() const = 0;