[downloader] Added utf-8 country names support

This commit is contained in:
Alex Zolotarev 2011-06-25 21:50:44 +03:00 committed by Alex Zolotarev
parent f53ac8ebed
commit 398718ae49
2 changed files with 11 additions and 11 deletions

View file

@ -20,7 +20,7 @@
Ghana
Guinea
Guinea-Bissau
Ivory Coast
Côte d'Ivoire|Ivory Coast
Kenya
Liberia
Libya
@ -137,23 +137,23 @@
Centre|France_Centre
Champagne-Ardenne|France_Champagne-Ardenne
Corsica|France_Corsica
Franche-Comte|France_Franche-Comte
Franche-Comté|France_Franche-Comte
Haute-Normandie|France_Haute-Normandie
Languedoc-Roussillon|France_Languedoc-Roussillon
Limousin|France_Limousin
Lorraine|France_Lorraine
Midi-Pyrenees|France_Midi-Pyrenees
Midi-Pyrénées|France_Midi-Pyrenees
Nord-Pas-de-Calais|France_Nord-Pas-de-Calais
Paris & Ile-de-France|France_Paris & Ile-de-France
Paris & Île-de-France|France_Paris & Ile-de-France
Pays de la Loire|France_Pays de la Loire
Picardie|France_Picardie
Poitou-Charentes|France_Poitou-Charentes
Provence-Alpes-Cote d'Azur|France_Provence-Alpes-Cote d'Azur
Rhone-Alpes|France_Rhone-Alpes
Provence-Alpes-Côte d'Azur|France_Provence-Alpes-Cote d'Azur
Rhône-Alpes|France_Rhone-Alpes
Georgia
Germany
All states|Germany_Baden-Wurttemberg|Germany_Bavaria|Germany_Berlin & Brandenburg|Germany_Bremen & Lower Saxony|Germany_Hamburg|Germany_Hesse|Germany_Mecklenburg-Vorpommern|Germany_North Rhine-Westphalia|Germany_Rhineland-Palatinate|Germany_Saarland|Germany_Saxony-Anhalt|Germany_Saxony|Germany_Schleswig-Holstein|Germany_Thuringia
Baden-Wurttemberg|Germany_Baden-Wurttemberg
Baden-Württemberg|Germany_Baden-Wurttemberg
Bavaria|Germany_Bavaria
Berlin & Brandenburg|Germany_Berlin & Brandenburg
Bremen & Lower Saxony|Germany_Bremen & Lower Saxony
@ -229,7 +229,7 @@
Faroe Islands
Saint Helena, Ascension and Tristan da Cunha
Saint Pierre and Miquelon
Sao Tome and Principe
São Tomé and Príncipe|Sao Tome and Principe
South Georgia and the South Sandwich Islands
Indian Ocean
British Indian Ocean Territory

View file

@ -334,7 +334,7 @@ namespace qt
for (int group = 0; group < static_cast<int>(m_storage.CountriesCount(TIndex())); ++group)
{
TIndex const grIndex(group);
QStringList groupText(m_storage.CountryName(grIndex).c_str());
QStringList groupText(QString::fromUtf8(m_storage.CountryName(grIndex).c_str()));
QTreeWidgetItem * groupItem = new QTreeWidgetItem(groupText);
groupItem->setData(KColumnIndexCountry, Qt::UserRole, QVariant(group));
m_tree->addTopLevelItem(groupItem);
@ -344,7 +344,7 @@ namespace qt
for (int country = 0; country < static_cast<int>(m_storage.CountriesCount(grIndex)); ++country)
{
TIndex cIndex(group, country);
QStringList countryText(m_storage.CountryName(cIndex).c_str());
QStringList countryText(QString::fromUtf8(m_storage.CountryName(cIndex).c_str()));
QTreeWidgetItem * countryItem = new QTreeWidgetItem(groupItem, countryText);
countryItem->setData(KColumnIndexCountry, Qt::UserRole, QVariant(country));
// set color by status and update country size
@ -353,7 +353,7 @@ namespace qt
for (int region = 0; region < static_cast<int>(m_storage.CountriesCount(cIndex)); ++region)
{
TIndex const rIndex(group, country, region);
QStringList regionText(m_storage.CountryName(rIndex).c_str());
QStringList regionText(QString::fromUtf8(m_storage.CountryName(rIndex).c_str()));
QTreeWidgetItem * regionItem = new QTreeWidgetItem(countryItem, regionText);
regionItem->setData(KColumnIndexCountry, Qt::UserRole, QVariant(region));
// set color by status and update country size