QTimeZone: use correct Darwin define in #if-ery
In so far as we support Darwin on tvOS or iOS, it surely makes more sense to use the same code as on macOS for them. This will also avoid further grumbles from the inanity 'bot about the use of the old define. As a drive-by, make the #if-ery on newBackendTimeZone() consistently use parentheses with defined. Change-Id: I6099adfedfc42bba057c8cbfbb38574e2e5d80d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
9896ebf93d
commit
adedd3f81d
@ -29,7 +29,7 @@ static QTimeZonePrivate *newBackendTimeZone()
|
||||
return new QUtcTimeZonePrivate();
|
||||
#endif
|
||||
#else
|
||||
#if defined Q_OS_MAC
|
||||
#if defined(Q_OS_DARWIN)
|
||||
return new QMacTimeZonePrivate();
|
||||
#elif defined(Q_OS_ANDROID)
|
||||
return new QAndroidTimeZonePrivate();
|
||||
@ -37,7 +37,7 @@ static QTimeZonePrivate *newBackendTimeZone()
|
||||
return new QTzTimeZonePrivate();
|
||||
#elif QT_CONFIG(icu)
|
||||
return new QIcuTimeZonePrivate();
|
||||
#elif defined Q_OS_WIN
|
||||
#elif defined(Q_OS_WIN)
|
||||
return new QWinTimeZonePrivate();
|
||||
#else
|
||||
return new QUtcTimeZonePrivate();
|
||||
@ -56,7 +56,7 @@ static QTimeZonePrivate *newBackendTimeZone(const QByteArray &ianaId)
|
||||
return new QUtcTimeZonePrivate(ianaId);
|
||||
#endif
|
||||
#else
|
||||
#if defined Q_OS_MAC
|
||||
#if defined(Q_OS_DARWIN)
|
||||
return new QMacTimeZonePrivate(ianaId);
|
||||
#elif defined(Q_OS_ANDROID)
|
||||
return new QAndroidTimeZonePrivate(ianaId);
|
||||
@ -64,7 +64,7 @@ static QTimeZonePrivate *newBackendTimeZone(const QByteArray &ianaId)
|
||||
return new QTzTimeZonePrivate(ianaId);
|
||||
#elif QT_CONFIG(icu)
|
||||
return new QIcuTimeZonePrivate(ianaId);
|
||||
#elif defined Q_OS_WIN
|
||||
#elif defined(Q_OS_WIN)
|
||||
return new QWinTimeZonePrivate(ianaId);
|
||||
#else
|
||||
return new QUtcTimeZonePrivate(ianaId);
|
||||
|
@ -334,7 +334,7 @@ private:
|
||||
};
|
||||
#endif // Q_OS_UNIX
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_DARWIN
|
||||
class Q_AUTOTEST_EXPORT QMacTimeZonePrivate final : public QTimeZonePrivate
|
||||
{
|
||||
public:
|
||||
@ -377,7 +377,7 @@ private:
|
||||
|
||||
NSTimeZone *m_nstz;
|
||||
};
|
||||
#endif // Q_OS_MAC
|
||||
#endif // Q_OS_DARWIN
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
class Q_AUTOTEST_EXPORT QWinTimeZonePrivate final : public QTimeZonePrivate
|
||||
|
Loading…
x
Reference in New Issue
Block a user