diff --git a/src/corelib/time/qtimezonelocale.cpp b/src/corelib/time/qtimezonelocale.cpp index 1396651a7fa..21002373d7a 100644 --- a/src/corelib/time/qtimezonelocale.cpp +++ b/src/corelib/time/qtimezonelocale.cpp @@ -39,19 +39,19 @@ using namespace Qt::StringLiterals; namespace { // Convert TimeType and NameType into ICU UCalendarDisplayNameType -constexpr UCalendarDisplayNameType ucalDisplayNameType(QTimeZone::TimeType timeType, - QTimeZone::NameType nameType) +UCalendarDisplayNameType ucalDisplayNameType(QTimeZone::TimeType timeType, + QTimeZone::NameType nameType) { // TODO ICU C UCalendarDisplayNameType does not support full set of C++ TimeZone::EDisplayType // For now, treat Generic as Standard switch (nameType) { - case QTimeZone::OffsetName: - Q_UNREACHABLE(); // Callers of ucalTimeZoneDisplayName() should take care of OffsetName. case QTimeZone::ShortName: return timeType == QTimeZone::DaylightTime ? UCAL_SHORT_DST : UCAL_SHORT_STANDARD; case QTimeZone::DefaultName: case QTimeZone::LongName: return timeType == QTimeZone::DaylightTime ? UCAL_DST : UCAL_STANDARD; + case QTimeZone::OffsetName: + Q_UNREACHABLE(); // Callers of ucalTimeZoneDisplayName() should take care of OffsetName. } Q_UNREACHABLE_RETURN(UCAL_STANDARD); }