Commit d220a879 authored by Volker Krause's avatar Volker Krause
Browse files

Deprecate the now sub-optimally named primary country code role

parent 412453b1
Pipeline #58924 passed with stage
in 30 seconds
......@@ -126,6 +126,7 @@ private Q_SLOTS:
if (!idx.data(BackendModel::SecureRole).toBool()) {
QVERIFY(!idx.data(BackendModel::BackendEnabledRole).toBool());
}
QVERIFY(!idx.data(BackendModel::CountryCodeRole).toString().isEmpty());
}
QCOMPARE(dataChangedSpy.size(), 0);
......
......@@ -235,6 +235,7 @@ QVariant BackendModel::data(const QModelIndex &index, int role) const
}
return d->mgr->isBackendEnabled(row.backend.identifier()) ? Qt::Checked : Qt::Unchecked;
case PrimaryCountryCodeRole:
case CountryCodeRole:
return row.country;
}
......@@ -281,5 +282,6 @@ QHash<int, QByteArray> BackendModel::roleNames() const
names.insert(ItemEnabledRole, "itemEnabled");
names.insert(BackendEnabledRole, "backendEnabled");
names.insert(PrimaryCountryCodeRole, "primaryCountryCode");
names.insert(CountryCodeRole, "countryCode");
return names;
}
......@@ -48,7 +48,8 @@ public:
SecureRole,
ItemEnabledRole,
BackendEnabledRole,
PrimaryCountryCodeRole, ///< See Backend::primaryCountry, useful for section grouping
PrimaryCountryCodeRole [[deprecated("use CountryCodeRole")]], ///< @deprecated use CountryCodeRole instead
CountryCodeRole, ///< a ISO 3166-1 code usable for grouping content by country
};
Manager* manager() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment