[localeq] Offer a Config setting to set location from region/zone

- already had methods for various kinds of broken-up data, but
  not one for plain "region/zone" strings; having this makes
  it easier for QML to report a zone.
- use the region/zone method from QML, so that clicking on the
  world map updates the actual TZ in Config.
This commit is contained in:
Adriaan de Groot 2020-07-24 11:07:58 +02:00
parent e78cde7ccb
commit a4ed160060
3 changed files with 21 additions and 4 deletions

View file

@ -218,6 +218,15 @@ Config::setCurrentLocation()
}
}
void Config::setCurrentLocation(const QString& regionzone)
{
auto r = CalamaresUtils::GeoIP::splitTZString( regionzone );
if ( r.isValid() )
{
setCurrentLocation( r.first, r.second );
}
}
void
Config::setCurrentLocation( const QString& regionName, const QString& zoneName )
{