KTimeZone KTimeZones::zone(const QString &name) const { if (!name.isEmpty()) { ZoneMap::ConstIterator it = d->zones.constFind(name); if (it != d->zones.constEnd()) return it.value(); if (name == KTimeZone::utc().name()) return KTimeZone::utc(); } return KTimeZone(); // error }
KTimeZone KTimeZones::remove(const QString &name) { if (!name.isEmpty()) { ZoneMap::Iterator it = d->zones.find(name); if (it != d->zones.end()) { KTimeZone zone = it.value(); d->zones.erase(it); return zone; } } return KTimeZone(); }
KTimeZone KTimeZones::remove(const KTimeZone &zone) { if (zone.isValid()) { for (ZoneMap::Iterator it = d->zones.begin(), end = d->zones.end(); it != end; ++it) { if (it.value() == zone) { d->zones.erase(it); return zone; } } } return KTimeZone(); }
void CityWeather::clear() { m_sCity.clear(); m_sCountry.clear(); m_sCountryCode.clear(); m_sExtraData.clear(); m_sProvider.clear(); m_sLocalizedCity.clear(); m_lastUpdate = QDateTime(); m_satelliteImage = QImage(); deleteAllDays(); m_sCredit.clear(); m_sCreditUrl.clear(); m_timeZone = KTimeZone(); }