summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qtimezoneprivate_p.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2024-02-26 16:18:46 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2024-04-22 16:01:01 +0200
commitd06cff08598129c85952f4d45a382d300cb4ac65 (patch)
tree509c79b36ecc9f43e2654e2b07b7a700176e3e92 /src/corelib/time/qtimezoneprivate_p.h
parentdd56558ecdebc2415990521b08286324d430ac5c (diff)
Tidy up a bit in QTZP_p.h
The ICU backend was using its base's displayName() but none of the other backends did so; have them do the same. This saves the need for a QTZP:: suffix one one call to the UTC backend's displayName(). The order of backends in the header is a jumbled mess and the set of could surely be reduced to a #if...#elif...#endif chain, especially once TZ's dependence on ICU is sorted out, so add a TODO about that. Change-Id: I6d6daf3f899f7c79538a7d16bc94b0610f1a4c28 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/time/qtimezoneprivate_p.h')
-rw-r--r--src/corelib/time/qtimezoneprivate_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/time/qtimezoneprivate_p.h b/src/corelib/time/qtimezoneprivate_p.h
index 4ad51f44e7..506acaa1f7 100644
--- a/src/corelib/time/qtimezoneprivate_p.h
+++ b/src/corelib/time/qtimezoneprivate_p.h
@@ -183,6 +183,7 @@ public:
QLocale::Territory territory() const override;
QString comment() const override;
+ using QTimeZonePrivate::displayName;
QString displayName(QTimeZone::TimeType timeType,
QTimeZone::NameType nameType,
const QLocale &locale) const override;
@@ -213,6 +214,9 @@ private:
int m_offsetFromUtc;
};
+// TODO: shuffle (almost reverse) order of and rework #if-ery here to use #elif
+// and match the #if-ery in each of QTZ's newBackendTimeZone() cascades for
+// backend selection.
#if QT_CONFIG(icu)
class Q_AUTOTEST_EXPORT QIcuTimeZonePrivate final : public QTimeZonePrivate
{
@@ -255,7 +259,7 @@ private:
UCalendar *m_ucal;
};
-#endif
+#endif // ICU
#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID)
struct QTzTransitionTime
@@ -303,6 +307,7 @@ public:
QLocale::Territory territory() const override;
QString comment() const override;
+ using QTimeZonePrivate::displayName;
QString displayName(QTimeZone::TimeType timeType,
QTimeZone::NameType nameType,
const QLocale &locale) const override;
@@ -361,6 +366,7 @@ public:
QString comment() const override;
+ using QTimeZonePrivate::displayName;
QString displayName(QTimeZone::TimeType timeType, QTimeZone::NameType nameType,
const QLocale &locale) const override;
QString abbreviation(qint64 atMSecsSinceEpoch) const override;
@@ -414,6 +420,7 @@ public:
QString comment() const override;
+ using QTimeZonePrivate::displayName;
QString displayName(QTimeZone::TimeType timeType, QTimeZone::NameType nameType,
const QLocale &locale) const override;
QString abbreviation(qint64 atMSecsSinceEpoch) const override;
@@ -462,6 +469,7 @@ public:
QAndroidTimeZonePrivate *clone() const override;
+ using QTimeZonePrivate::displayName;
QString displayName(QTimeZone::TimeType timeType, QTimeZone::NameType nameType,
const QLocale &locale) const override;
QString abbreviation(qint64 atMSecsSinceEpoch) const override;