on xenial help sign in
Fix some review comments
commite54d85c9a34d0fa51669e51cd9f1411a99782ec5 authorMichael Terry <michael.terry@canonical.com> dateTue 1 Mar 2016, 08:42 (11 years ago) parent8134b4b
2 files changed+7−7
plugins/Wizard/timezonemodel.cpp+6−6 plugins/Wizard/timezonemodel.h+1−1
plugins/Wizard/timezonemodel.cpp+6−6
@@ -60,12 +60,12 @@ QVariant TimeZoneLocationModel::data(const QModelIndex &index, int role) const
6060
6161 switch (role) {
6262 case Qt::DisplayRole:
63− return QVariant(QString("%1, %2, %3").arg(geonames_city_get_name(city))
64− .arg(geonames_city_get_state(city))
65− .arg(geonames_city_get_country(city)));
63+ return QStringLiteral("%1, %2, %3").arg(geonames_city_get_name(city))
64+ .arg(geonames_city_get_state(city))
65+ .arg(geonames_city_get_country(city));
6666 case SimpleRole:
67− return QVariant(QString("%1, %2").arg(geonames_city_get_name(city))
68− .arg(geonames_city_get_country(city)));
67+ return QStringLiteral("%1, %2").arg(geonames_city_get_name(city))
68+ .arg(geonames_city_get_country(city));
6969 case TimeZoneRole:
7070 return geonames_city_get_timezone(city);
7171 case CountryRole:
@@ -91,7 +91,7 @@ QHash<int, QByteArray> TimeZoneLocationModel::roleNames() const
9191 return m_roleNames;
9292}
9393
94−void TimeZoneLocationModel::setModel(QList<GeonamesCity *> locations)
94+void TimeZoneLocationModel::setModel(const QList<GeonamesCity *> &locations)
9595{
9696 beginResetModel();
9797
plugins/Wizard/timezonemodel.h+1−1
@@ -61,7 +61,7 @@ Q_SIGNALS:
6161 void countryChanged(const QString &country);
6262
6363private:
64− void setModel(QList<GeonamesCity *> locations);
64+ void setModel(const QList<GeonamesCity *> &locations);
6565 void setListUpdating(bool listUpdating);
6666 static void filterFinished(GObject *source_object,
6767 GAsyncResult *res,