summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qjalalicalendar.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/qjalalicalendar.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/qjalalicalendar.cpp')
-rw-r--r--src/corelib/time/qjalalicalendar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/time/qjalalicalendar.cpp b/src/corelib/time/qjalalicalendar.cpp
index 6ec7f9598a..a93474840b 100644
--- a/src/corelib/time/qjalalicalendar.cpp
+++ b/src/corelib/time/qjalalicalendar.cpp
@@ -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.
@@ -116,7 +116,7 @@ qint64 firstDayOfYear(int year, int cycleNo)
QJalaliCalendar::QJalaliCalendar()
: QCalendarBackend(QStringLiteral("Jalali"), QCalendar::System::Jalali)
{
- if (~calendarId()) {
+ if (calendarId().isValid()) {
Q_ASSERT(calendarSystem() == QCalendar::System::Jalali);
registerAlias(QStringLiteral("Persian"));
} // else: being ignored in favor of a duplicate created at the same time