summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qgregoriancalendar.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-06-22 12:29:23 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-19 14:55:26 +0000
commit3431104f4571f9ef3185e04f92078e96a3a6aa67 (patch)
treead9eaf1d8d2ed5b5ce76caafbd6769fbbb19e926 /src/corelib/time/qgregoriancalendar.cpp
parent61178f3458f11e5159dc01d24d05b1f224073cb4 (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 Change-Id: I862a6f52d284317e1243fd91f45bb0af130d154a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 1c547698ac3ff25e7581f033886318ee98eacc0a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/time/qgregoriancalendar.cpp')
-rw-r--r--src/corelib/time/qgregoriancalendar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/time/qgregoriancalendar.cpp b/src/corelib/time/qgregoriancalendar.cpp
index f562413dd1..6d0c3ac925 100644
--- a/src/corelib/time/qgregoriancalendar.cpp
+++ b/src/corelib/time/qgregoriancalendar.cpp
@@ -63,7 +63,7 @@ using namespace QRoundingDown;
QGregorianCalendar::QGregorianCalendar()
: QRomanCalendar(QStringLiteral("Gregorian"), QCalendar::System::Gregorian)
{
- if (~calendarId()) {
+ if (calendarId().isValid()) {
Q_ASSERT(calendarSystem() == QCalendar::System::Gregorian);
registerAlias(QStringLiteral("gregory"));
} // else: being ignored in favor of a duplicate created at the same time