Changeset View
Changeset View
Standalone View
Standalone View
applets/digital-clock/plugin/timezonemodel.cpp
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Line(s) | 155 | const QString key = QStringLiteral("%1|%2|%3").arg(splitted.last(), | |||
---|---|---|---|---|---|
156 | QLocale::countryToString(zone.country()), | 156 | QLocale::countryToString(zone.country()), | ||
157 | splitted.first()); | 157 | splitted.first()); | ||
158 | 158 | | |||
159 | cities.append(key); | 159 | cities.append(key); | ||
160 | zonesByCity.insert(key, zone); | 160 | zonesByCity.insert(key, zone); | ||
161 | } | 161 | } | ||
162 | cities.sort(Qt::CaseInsensitive); | 162 | cities.sort(Qt::CaseInsensitive); | ||
163 | 163 | | |||
164 | Q_FOREACH (const QString &key, cities) { | 164 | for (const QString &key : qAsConst(cities)) { | ||
165 | const QTimeZone timeZone = zonesByCity.value(key); | 165 | const QTimeZone timeZone = zonesByCity.value(key); | ||
166 | QString comment = timeZone.comment(); | 166 | QString comment = timeZone.comment(); | ||
167 | 167 | | |||
168 | if (!comment.isEmpty()) { | 168 | if (!comment.isEmpty()) { | ||
169 | comment = i18n(comment.toUtf8()); | 169 | comment = i18n(comment.toUtf8()); | ||
170 | } | 170 | } | ||
171 | 171 | | |||
172 | const QStringList cityCountryContinent = key.split(QLatin1Char('|')); | 172 | const QStringList cityCountryContinent = key.split(QLatin1Char('|')); | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |