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

Remove the now obsolete primary country code method

There is no such thing anymore, there is now more detailed information
available via the CoverageArea API.
parent 6ba69baf
Pipeline #58556 passed with stage
in 25 seconds
......@@ -37,14 +37,6 @@ bool Backend::isSecure() const
return d->m_backendImpl && d->m_backendImpl->capabilities() & AbstractBackend::Secure;
}
QString Backend::primaryCountryCode() const
{
if (identifier().size() > 3 && identifier().at(2) == QLatin1Char('_')) {
return identifier().left(2).toUpper();
}
return {};
}
CoverageArea Backend::coverageArea(CoverageArea::Type coverageType) const
{
return d->coverage[coverageType];
......
......@@ -34,17 +34,11 @@ class KPUBLICTRANSPORT_EXPORT Backend
*/
Q_PROPERTY(bool isSecure READ isSecure)
/** ISO 3166-2 alpha 2 code of the country this backend service is primarity addressing.
* Returns an empty value for global/international services.
*/
Q_PROPERTY(QString primaryCountryCode READ primaryCountryCode)
public:
QString identifier() const;
QString name() const;
QString description() const;
bool isSecure() const;
QString primaryCountryCode() const;
CoverageArea coverageArea(CoverageArea::Type coverageType) const;
};
......
......@@ -61,7 +61,9 @@ void BackendModelPrivate::repopulateFlat()
{
rows.reserve(mgr->backends().size());
for (const auto &b : mgr->backends()) {
rows.push_back({ b, b.primaryCountryCode(), true, CoverageArea::Any });
if (b.identifier().size() > 3 && b.identifier().at(2) == QLatin1Char('_')) {
rows.push_back({ b, b.identifier().left(2).toUpper(), true, CoverageArea::Any });
}
}
}
......
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