diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-11-10 18:49:43 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-12-07 14:58:41 +0100 |
commit | c50b20a484620f394eab4c0cafaadabbd0f716d2 (patch) | |
tree | ce785d026899be6f569d5f6f7251288bcc3b9d26 /src | |
parent | de1895f423c9802de9a897d875ea978498b25b0b (diff) |
Shuffle QTimeZone so backend-dependent parts are contiguous
Coming work shall limit the feature to controlling these parts of the
class, while making the rest visible to all builds.
Change-Id: I602c604c8c66bd4f1816a9dabef19c72527831a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/time/qtimezone.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/corelib/time/qtimezone.h b/src/corelib/time/qtimezone.h index 677fb4afb2..796d838a5c 100644 --- a/src/corelib/time/qtimezone.h +++ b/src/corelib/time/qtimezone.h @@ -33,6 +33,28 @@ public: MaxUtcOffsetSecs = +14 * 3600 }; + QTimeZone() noexcept; + explicit QTimeZone(int offsetSeconds); + + explicit QTimeZone(const QByteArray &ianaId); + QTimeZone(const QByteArray &zoneId, int offsetSeconds, const QString &name, + const QString &abbreviation, QLocale::Territory territory = QLocale::AnyTerritory, + const QString &comment = QString()); + QTimeZone(const QTimeZone &other) noexcept; + QTimeZone(QTimeZone &&other) noexcept; + ~QTimeZone(); + + QTimeZone &operator=(const QTimeZone &other); + QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QTimeZone) + + void swap(QTimeZone &other) noexcept + { d.swap(other.d); } + + bool operator==(const QTimeZone &other) const; + bool operator!=(const QTimeZone &other) const; + + bool isValid() const; + enum TimeType { StandardTime = 0, DaylightTime = 1, @@ -55,27 +77,6 @@ public: }; typedef QList<OffsetData> OffsetDataList; - QTimeZone() noexcept; - explicit QTimeZone(const QByteArray &ianaId); - explicit QTimeZone(int offsetSeconds); - QTimeZone(const QByteArray &zoneId, int offsetSeconds, const QString &name, - const QString &abbreviation, QLocale::Territory territory = QLocale::AnyTerritory, - const QString &comment = QString()); - QTimeZone(const QTimeZone &other) noexcept; - QTimeZone(QTimeZone &&other) noexcept; - ~QTimeZone(); - - QTimeZone &operator=(const QTimeZone &other); - QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QTimeZone) - - void swap(QTimeZone &other) noexcept - { d.swap(other.d); } - - bool operator==(const QTimeZone &other) const; - bool operator!=(const QTimeZone &other) const; - - bool isValid() const; - QByteArray id() const; QLocale::Territory territory() const; #if QT_DEPRECATED_SINCE(6, 6) @@ -143,10 +144,10 @@ public: #endif private: - QTimeZone(QTimeZonePrivate &dd); #ifndef QT_NO_DATASTREAM friend Q_CORE_EXPORT QDataStream &operator<<(QDataStream &ds, const QTimeZone &tz); #endif + QTimeZone(QTimeZonePrivate &dd); friend class QTimeZonePrivate; friend class QDateTime; friend class QDateTimePrivate; |