summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qcalendarbackend_p.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-06-22 12:29:23 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-07-19 11:32:15 +0200
commit1c547698ac3ff25e7581f033886318ee98eacc0a (patch)
tree0264566d82c912f7f393fc515388638addfa8284 /src/corelib/time/qcalendarbackend_p.h
parentd115f17cb84f759c2146eaaa25bf52a9d7b900f0 (diff)
Make QCalendarBackend's ID an opaque type
As Giuseppe pointed out in API change review, an opaque type should be used. Task-number: QTBUG-94407 Pick-to: 6.2 Change-Id: I862a6f52d284317e1243fd91f45bb0af130d154a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/time/qcalendarbackend_p.h')
-rw-r--r--src/corelib/time/qcalendarbackend_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/time/qcalendarbackend_p.h b/src/corelib/time/qcalendarbackend_p.h
index b011fa0f62..c3f57e7f74 100644
--- a/src/corelib/time/qcalendarbackend_p.h
+++ b/src/corelib/time/qcalendarbackend_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -93,7 +93,7 @@ public:
virtual ~QCalendarBackend();
virtual QString name() const = 0;
QCalendar::System calendarSystem() const;
- size_t calendarId() const { return m_id; }
+ QCalendar::SystemId calendarId() const { return m_id; }
// Date queries:
virtual int daysInMonth(int month, int year = QCalendar::Unspecified) const = 0;
virtual int daysInYear(int year) const;
@@ -143,11 +143,11 @@ protected:
bool registerAlias(const QString &name);
private:
- const size_t m_id = ~size_t(0);
+ const QCalendar::SystemId m_id;
// QCalendar's access to its registry:
static const QCalendarBackend *fromName(QStringView name);
static const QCalendarBackend *fromName(QLatin1String name);
- static const QCalendarBackend *fromId(size_t id);
+ static const QCalendarBackend *fromId(QCalendar::SystemId id);
// QCalendar's access to singletons:
static const QCalendarBackend *fromEnum(QCalendar::System system);
};