Read country codes from zone.tab.
This commit is contained in:
parent
a51061029e
commit
471d94a02e
@ -1,6 +1,6 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Originally from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
@ -149,10 +149,15 @@ void LocaleGlobal::initLocations() {
|
||||
if (timezone.size() < 2)
|
||||
continue;
|
||||
|
||||
QString countryCode = list.at(0).trimmed();
|
||||
if (countryCode.size() != 2)
|
||||
continue;
|
||||
|
||||
location.region = timezone.takeFirst();
|
||||
location.zone = timezone.join( '/' );
|
||||
location.latitude = getRightGeoLocation(list.at(1).mid(0, cooSplitPos));
|
||||
location.longitude = getRightGeoLocation(list.at(1).mid(cooSplitPos));
|
||||
location.country = countryCode;
|
||||
|
||||
locations[location.region].append(location);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Originally from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
@ -43,7 +43,7 @@ public:
|
||||
};
|
||||
|
||||
struct Location {
|
||||
QString region, zone;
|
||||
QString region, zone, country;
|
||||
double latitude, longitude;
|
||||
static QString pretty( const QString& s );
|
||||
QString comment() const;
|
||||
|
Loading…
Reference in New Issue
Block a user