diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-01-05 16:28:53 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-01-23 21:55:22 +0000 |
commit | 4b507e8257243e36f40089d57099c2d668c5884d (patch) | |
tree | 23a75ff6ec67aa970d3bafdf0f029ca33a08feab /src/corelib/tools/qtimezone.h | |
parent | decab46c235bf9be355879f285022e92e88aa6b1 (diff) |
Add conversion functions for QTimeZone and CFTimeZone/NSTimeZone
Change-Id: I3a2e18d69577296bf612e13e40414bce1daa6a71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qtimezone.h')
-rw-r--r-- | src/corelib/tools/qtimezone.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/tools/qtimezone.h b/src/corelib/tools/qtimezone.h index 083f87f39f..bd87139f5b 100644 --- a/src/corelib/tools/qtimezone.h +++ b/src/corelib/tools/qtimezone.h @@ -47,6 +47,11 @@ QT_REQUIRE_CONFIG(timezone); +#if (defined(Q_OS_DARWIN) || defined(Q_QDOC)) && !defined(QT_NO_SYSTEMLOCALE) +Q_FORWARD_DECLARE_CF_TYPE(CFTimeZone); +Q_FORWARD_DECLARE_OBJC_CLASS(NSTimeZone); +#endif + QT_BEGIN_NAMESPACE class QTimeZonePrivate; @@ -142,6 +147,13 @@ public: static QList<QByteArray> windowsIdToIanaIds(const QByteArray &windowsId, QLocale::Country country); +#if (defined(Q_OS_DARWIN) || defined(Q_QDOC)) && !defined(QT_NO_SYSTEMLOCALE) + static QTimeZone fromCFTimeZone(CFTimeZoneRef timeZone); + CFTimeZoneRef toCFTimeZone() const Q_DECL_CF_RETURNS_RETAINED; + static QTimeZone fromNSTimeZone(const NSTimeZone *timeZone); + NSTimeZone *toNSTimeZone() const Q_DECL_NS_RETURNS_AUTORELEASED; +#endif + private: QTimeZone(QTimeZonePrivate &dd); #ifndef QT_NO_DATASTREAM |