Remove broken string conversion

parent 73b35a65
...@@ -300,11 +300,10 @@ QString GeoDataPlacemark::displayName() const ...@@ -300,11 +300,10 @@ QString GeoDataPlacemark::displayName() const
OsmPlacemarkData const &data = osmData(); OsmPlacemarkData const &data = osmData();
QStringList const uiLanguages = QLocale::system().uiLanguages(); QStringList const uiLanguages = QLocale::system().uiLanguages();
foreach (const QString &uiLanguage, uiLanguages) { foreach (const QString &uiLanguage, uiLanguages) {
QString const language = uiLanguage.toLocal8Bit().constData();
for (auto tagIter = data.tagsBegin(), end = data.tagsEnd(); tagIter != end; ++tagIter) { for (auto tagIter = data.tagsBegin(), end = data.tagsEnd(); tagIter != end; ++tagIter) {
if (tagIter.key().startsWith(QLatin1String("name:"))) { if (tagIter.key().startsWith(QLatin1String("name:"))) {
QStringRef const tagLanguage = tagIter.key().midRef(5); QStringRef const tagLanguage = tagIter.key().midRef(5);
if (tagLanguage == language) { if (tagLanguage == uiLanguage) {
return tagIter.value(); return tagIter.value();
} }
} }
......
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