Tidy up some QTimeZone code and comments
Correct a member comment in LocaleMetaZoneLongNames. Remove a superfluous else in QUtcTimeZonePrivate::displayName(). Add a TODO comment to QUtcTimeZonePrivate::isTimeZoneIdAvailable(). Pick-to: 6.9 6.8 Change-Id: Iddc144a267ca8fb33a6577e8d671ef3da53ca525 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
bb8c1b85af
commit
7983b9bd9a
@ -154,7 +154,7 @@ struct LocaleZoneNames
|
||||
struct LocaleMetaZoneLongNames
|
||||
{
|
||||
quint16 localeIndex; // Index in locale data tables
|
||||
quint16 metaIdIndex; // metaZoneTable[metaZoneKey - 1].metaIdIndex
|
||||
quint16 metaIdIndex; // As for MetaZoneData metaZoneTable[].
|
||||
timeTypeRange(long)
|
||||
#define forEachField(X) forEachNameType(X, long)
|
||||
// Long localized names (length zero for unspecified) for the
|
||||
|
@ -1084,7 +1084,7 @@ QString QUtcTimeZonePrivate::displayName(QTimeZone::TimeType timeType,
|
||||
Q_UNUSED(locale);
|
||||
if (nameType == QTimeZone::ShortName)
|
||||
return m_abbreviation;
|
||||
else if (nameType == QTimeZone::OffsetName)
|
||||
if (nameType == QTimeZone::OffsetName)
|
||||
return isoOffsetFormat(m_offsetFromUtc);
|
||||
return m_name;
|
||||
}
|
||||
@ -1112,6 +1112,7 @@ QByteArray QUtcTimeZonePrivate::systemTimeZoneId() const
|
||||
return utcQByteArray();
|
||||
}
|
||||
|
||||
// TODO: port to QByteArrayView
|
||||
bool QUtcTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray &ianaId) const
|
||||
{
|
||||
// Only the zone IDs supplied by CLDR and recognized by constructor.
|
||||
|
Loading…
x
Reference in New Issue
Block a user