on xenial help sign in
clazy fixes
commitc79490a0eb29e2118a3020b1c69f7fb32bacc59a authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 20 Apr 2016, 09:41 (10 years ago) parentab21d91
6 files changed+10−12
plugins/IntegratedLightDM/liblightdm/UsersModel.cpp−2 plugins/Ubuntu/Gestures/TouchGestureArea.h+1−1 plugins/Utils/deviceconfigparser.cpp+1−1 plugins/Utils/timezoneFormatter.cpp+1−1 plugins/Wizard/timezonemodel.cpp+5−5 tools/registry-tracker.cpp+2−2
plugins/IntegratedLightDM/liblightdm/UsersModel.cpp−2
@@ -40,8 +40,6 @@ UsersModel::UsersModel(QObject *parent) :
4040 QAbstractListModel(parent),
4141 d_ptr(new UsersModelPrivate(this))
4242{
43− Q_D(UsersModel);
44−
4543 // Extend roleNames (we want to keep the "display" role)
4644 QHash<int, QByteArray> roles = roleNames();
4745 roles[NameRole] = "name";
plugins/Ubuntu/Gestures/TouchGestureArea.h+1−1
@@ -176,7 +176,7 @@ Q_SIGNALS:
176176 void clicked();
177177
178178protected:
179− void itemChange(ItemChange change, const ItemChangeData &value);
179+ void itemChange(ItemChange change, const ItemChangeData &value) override;
180180
181181private Q_SLOTS:
182182 void rejectGesture();
plugins/Utils/deviceconfigparser.cpp+1−1
@@ -25,7 +25,7 @@ DeviceConfigParser::DeviceConfigParser(QObject *parent): QObject(parent)
2525{
2626 QString path;
2727 Q_FOREACH (const QString &standardPath, QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)) {
28− if (QFileInfo(standardPath + "/devices.conf").exists()) {
28+ if (QFileInfo::exists(standardPath + "/devices.conf")) {
2929 path = standardPath + "/devices.conf";
3030 break;
3131 }
plugins/Utils/timezoneFormatter.cpp+1−1
@@ -39,7 +39,7 @@ QString TimezoneFormatter::currentTimeInTimezoneWithAbbrev(const QVariant &tzId)
3939 QTimeZone tz(tzId.toByteArray());
4040 if (tz.isValid()) {
4141 const QDateTime now = QDateTime::currentDateTime().toTimeZone(tz);
42− return QStringLiteral("%1 %2").arg(now.time().toString(QStringLiteral("h:mm"))).arg(tz.abbreviation(now));
42+ return QStringLiteral("%1 %2").arg(now.time().toString(QStringLiteral("h:mm")), tz.abbreviation(now));
4343 }
4444 return QString();
4545}
plugins/Wizard/timezonemodel.cpp+5−5
@@ -60,12 +60,12 @@ QVariant TimeZoneLocationModel::data(const QModelIndex &index, int role) const
6060
6161 switch (role) {
6262 case Qt::DisplayRole:
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));
63+ return QStringLiteral("%1, %2, %3").arg(geonames_city_get_name(city),
64+ geonames_city_get_state(city),
65+ geonames_city_get_country(city));
6666 case SimpleRole:
67− return QStringLiteral("%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+ geonames_city_get_country(city));
6969 case TimeZoneRole:
7070 return geonames_city_get_timezone(city);
7171 case CountryRole:
tools/registry-tracker.cpp+2−2
@@ -110,7 +110,7 @@ void RegistryTracker::runRegistry()
110110 }
111111
112112 // FIXME: keep in sync with the SSRegistry config
113− QString runtime_ini = QString(RUNTIME_CONFIG).arg(m_registry_config.fileName()).arg(m_mw_config.fileName()).arg(m_serverScopes ? "SSRegistry" : "");
113+ QString runtime_ini = QString(RUNTIME_CONFIG).arg(m_registry_config.fileName(), m_mw_config.fileName(), m_serverScopes ? "SSRegistry" : "");
114114 if (!m_systemScopes) {
115115 m_scopeInstallDir.reset(new QTemporaryDir(tmp.filePath("scopes.XXXXXX")));
116116 if (!m_scopeInstallDir->isValid()) {
@@ -118,7 +118,7 @@ void RegistryTracker::runRegistry()
118118 }
119119 scopeInstallDir = m_scopeInstallDir->path();
120120 }
121− QString registry_ini = QString(REGISTRY_CONFIG).arg(m_mw_config.fileName()).arg(scopeInstallDir).arg(scopeRunnerBin);
121+ QString registry_ini = QString(REGISTRY_CONFIG).arg(m_mw_config.fileName(), scopeInstallDir, scopeRunnerBin);
122122 QString mw_ini = QString(MW_CONFIG).arg(m_endpoints_dir.path());
123123
124124 if (!m_systemScopes) {