> Hey, > > no big mistakes spotted. Seems fine. If you want, for easier readability you > could perhaps create a method like: > > void addTimeZone(const QString &city, const QString &country, const QString > &timeZoneName) { > TimeZone tz; > tz.cityName = city; > tz.timeZone = QTimeZone(timeZoneName);
This had to be tz.timeZone QTimeZone(timeZoneName.toLatin1()) for it to work. Was not sure exactly why.
> tz.country = tr(country); > m_timeZones.append(tz); > } > > and then call a lot of: > > addTimeZone(tr("Anadyr"), tr("Russia"), "Asia/Anadyr"); > addTimeZone(tr("Anchorage"), tr("United States"), "America/Anchorage");
Yup Done. That looks much better. Thnx :)
« Back to merge proposal
> Hey, timeZoneName) ;
>
> no big mistakes spotted. Seems fine. If you want, for easier readability you
> could perhaps create a method like:
>
> void addTimeZone(const QString &city, const QString &country, const QString
> &timeZoneName) {
> TimeZone tz;
> tz.cityName = city;
> tz.timeZone = QTimeZone(
This had to be tz.timeZone QTimeZone( timeZoneName. toLatin1( )) for it to work. Was not sure exactly why.
> tz.country = tr(country); append( tz); tr("Anadyr" ), tr("Russia"), "Asia/Anadyr"); tr("Anchorage" ), tr("United States"), "America/ Anchorage" );
> m_timeZones.
> }
>
> and then call a lot of:
>
> addTimeZone(
> addTimeZone(
Yup Done. That looks much better. Thnx :)