Git commit 2002b5eb6b39b62bdd6b30c56d8c4961cc7c5df0 by Maik Qualmann. Committed on 03/02/2016 at 21:15. Pushed by mqualmann into branch 'master'. QStringLiteral =3D> QLatin1String M +88 -88 utilities/geolocation/editor/reversegeocoding/parsetagstring= .h http://commits.kde.org/digikam/2002b5eb6b39b62bdd6b30c56d8c4961cc7c5df0 diff --git a/utilities/geolocation/editor/reversegeocoding/parsetagstring.h= b/utilities/geolocation/editor/reversegeocoding/parsetagstring.h index e5d3c18..ce8509c 100644 --- a/utilities/geolocation/editor/reversegeocoding/parsetagstring.h +++ b/utilities/geolocation/editor/reversegeocoding/parsetagstring.h @@ -45,167 +45,167 @@ QStringList makeTagString(const RGInfo& info,const QS= tring& inputFormat,const QS = int indexFBracket =3D -1; = - while ((indexFBracket =3D returnedAddress.indexOf(QStringLiteral("{"))= ) >=3D 0) + while ((indexFBracket =3D returnedAddress.indexOf(QLatin1String("{")))= >=3D 0) { - int indexLBracket =3D returnedAddress.indexOf(QStringLiteral= ("}")); + int indexLBracket =3D returnedAddress.indexOf(QLatin1String(= "}")); QString humanTag =3D returnedAddress.mid(indexFBracket + 1,= indexLBracket-indexFBracket-1); - int indexFormatFBracket =3D auxReturnedFormat.indexOf(QStringLiter= al("{")); - auxReturnedFormat.replace(indexFormatFBracket - 1, humanTag.length= () + 3, QStringLiteral("")); + int indexFormatFBracket =3D auxReturnedFormat.indexOf(QLatin1Strin= g("{")); + auxReturnedFormat.replace(indexFormatFBracket - 1, humanTag.length= () + 3, QLatin1String("")); bool dataAdded =3D false; QString result; = - if (backendName =3D=3D QStringLiteral("OSM")) + if (backendName =3D=3D QLatin1String("OSM")) { - if (humanTag =3D=3D QStringLiteral("Country")) + if (humanTag =3D=3D QLatin1String("Country")) { - if (!info.rgData[QStringLiteral("country")].isEmpty()) + if (!info.rgData[QLatin1String("country")].isEmpty()) { - result =3D info.rgData[QStringLiteral("country")]; - returnedFormat.append(QStringLiteral("/{Country}")); + result =3D info.rgData[QLatin1String("country")]; + returnedFormat.append(QLatin1String("/{Country}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("State district")) + else if (humanTag =3D=3D QLatin1String("State district")) { - if (!info.rgData[QStringLiteral("state_district")].isEmpty= ()) + if (!info.rgData[QLatin1String("state_district")].isEmpty(= )) { - result =3D info.rgData[QStringLiteral("state_distri= ct")]; - returnedFormat.append(QStringLiteral("/{State district= }")); + result =3D info.rgData[QLatin1String("state_distric= t")]; + returnedFormat.append(QLatin1String("/{State district}= ")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("County")) + else if (humanTag =3D=3D QLatin1String("County")) { - if (!info.rgData[QStringLiteral("county")].isEmpty()) + if (!info.rgData[QLatin1String("county")].isEmpty()) { - result =3D info.rgData[QStringLiteral("county")]; - returnedFormat.append(QStringLiteral("/{County}")); + result =3D info.rgData[QLatin1String("county")]; + returnedFormat.append(QLatin1String("/{County}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("City")) + else if (humanTag =3D=3D QLatin1String("City")) { - if (!info.rgData[QStringLiteral("city")].isEmpty()) + if (!info.rgData[QLatin1String("city")].isEmpty()) { - result =3D info.rgData[QStringLiteral("city")]; - returnedFormat.append(QStringLiteral("/{City}")); + result =3D info.rgData[QLatin1String("city")]; + returnedFormat.append(QLatin1String("/{City}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("City district")) + else if (humanTag =3D=3D QLatin1String("City district")) { - if (!info.rgData[QStringLiteral("city_district")].isEmpty(= )) + if (!info.rgData[QLatin1String("city_district")].isEmpty()) { - result =3D info.rgData[QStringLiteral("city_distric= t")]; - returnedFormat.append(QStringLiteral("/{City district}= ")); + result =3D info.rgData[QLatin1String("city_district= ")]; + returnedFormat.append(QLatin1String("/{City district}"= )); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("Suburb")) + else if (humanTag =3D=3D QLatin1String("Suburb")) { - if (!info.rgData[QStringLiteral("suburb")].isEmpty()) + if (!info.rgData[QLatin1String("suburb")].isEmpty()) { - result =3D info.rgData[QStringLiteral("suburb")]; - returnedFormat.append(QStringLiteral("/{Suburb}")); + result =3D info.rgData[QLatin1String("suburb")]; + returnedFormat.append(QLatin1String("/{Suburb}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("Street")) + else if (humanTag =3D=3D QLatin1String("Street")) { - if (!info.rgData[QStringLiteral("road")].isEmpty()) + if (!info.rgData[QLatin1String("road")].isEmpty()) { - result =3D info.rgData[QStringLiteral("road")]; - returnedFormat.append(QStringLiteral("/{Street}")); + result =3D info.rgData[QLatin1String("road")]; + returnedFormat.append(QLatin1String("/{Street}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("State")) + else if (humanTag =3D=3D QLatin1String("State")) { - if (!info.rgData[QStringLiteral("state")].isEmpty()) + if (!info.rgData[QLatin1String("state")].isEmpty()) { - result =3D info.rgData[QStringLiteral("state")]; - returnedFormat.append(QStringLiteral("/{State}")); + result =3D info.rgData[QLatin1String("state")]; + returnedFormat.append(QLatin1String("/{State}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("Town")) + else if (humanTag =3D=3D QLatin1String("Town")) { - if (!info.rgData[QStringLiteral("town")].isEmpty()) + if (!info.rgData[QLatin1String("town")].isEmpty()) { - result =3D info.rgData[QStringLiteral("town")]; - returnedFormat.append(QStringLiteral("/{Town}")); + result =3D info.rgData[QLatin1String("town")]; + returnedFormat.append(QLatin1String("/{Town}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("Village")) + else if (humanTag =3D=3D QLatin1String("Village")) { - if (!info.rgData[QStringLiteral("village")].isEmpty()) + if (!info.rgData[QLatin1String("village")].isEmpty()) { - result =3D info.rgData[QStringLiteral("village")]; - returnedFormat.append(QStringLiteral("/{Village}")); + result =3D info.rgData[QLatin1String("village")]; + returnedFormat.append(QLatin1String("/{Village}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("Hamlet")) + else if (humanTag =3D=3D QLatin1String("Hamlet")) { - if (!info.rgData[QStringLiteral("hamlet")].isEmpty()) + if (!info.rgData[QLatin1String("hamlet")].isEmpty()) { - result =3D info.rgData[QStringLiteral("hamlet")]; - returnedFormat.append(QStringLiteral("/{Hamlet}")); + result =3D info.rgData[QLatin1String("hamlet")]; + returnedFormat.append(QLatin1String("/{Hamlet}")); dataAdded =3D true; } } - else if (humanTag =3D=3D QStringLiteral("House number")) + else if (humanTag =3D=3D QLatin1String("House number")) { - if (!info.rgData[QStringLiteral("house_number")].isEmpty()) + if (!info.rgData[QLatin1String("house_number")].isEmpty()) { - result =3D info.rgData[QStringLiteral("house_number= ")]; - returnedFormat.append(QStringLiteral("/{House number}"= )); + result =3D info.rgData[QLatin1String("house_number"= )]; + returnedFormat.append(QLatin1String("/{House number}")= ); dataAdded =3D true; } } else { - returnedAddress.replace(indexFBracket - 1, indexLBracket -= indexFBracket + 2, QStringLiteral("")); + returnedAddress.replace(indexFBracket - 1, indexLBracket -= indexFBracket + 2, QLatin1String("")); = - int indexFormatFBracket =3D auxReturnedFormat.indexOf(QStr= ingLiteral("{")); - int indexFormatLBracket =3D auxReturnedFormat.indexOf(QStr= ingLiteral("}")); + int indexFormatFBracket =3D auxReturnedFormat.indexOf(QLat= in1String("{")); + int indexFormatLBracket =3D auxReturnedFormat.indexOf(QLat= in1String("}")); auxReturnedFormat.replace(indexFormatFBracket - 1, indexFormatLBracket - indexForma= tFBracket + 2, - QStringLiteral("")); + QLatin1String("")); dataAdded =3D true; } } = - else if (backendName =3D=3D QStringLiteral("GeonamesUS")) + else if (backendName =3D=3D QLatin1String("GeonamesUS")) { = - if (humanTag.compare(QStringLiteral("LAU2")) =3D=3D 0) + if (humanTag.compare(QLatin1String("LAU2")) =3D=3D 0) { - if (!info.rgData[QStringLiteral("adminName2")].isEmpty()) + if (!info.rgData[QLatin1String("adminName2")].isEmpty()) { - result =3D info.rgData[QStringLiteral("adminName2")= ]; - returnedFormat.append(QStringLiteral("/{LAU2}")); + result =3D info.rgData[QLatin1String("adminName2")]; + returnedFormat.append(QLatin1String("/{LAU2}")); dataAdded =3D true; } } = - else if (humanTag =3D=3D QStringLiteral("LAU1")) + else if (humanTag =3D=3D QLatin1String("LAU1")) { - if (!info.rgData[QStringLiteral("adminName1")].isEmpty()) + if (!info.rgData[QLatin1String("adminName1")].isEmpty()) { - result =3D info.rgData[QStringLiteral("adminName1")= ]; - returnedFormat.append(QStringLiteral("/{LAU1}")); + result =3D info.rgData[QLatin1String("adminName1")]; + returnedFormat.append(QLatin1String("/{LAU1}")); dataAdded =3D true; } } = - else if (humanTag =3D=3D QStringLiteral("City")) + else if (humanTag =3D=3D QLatin1String("City")) { - if (!info.rgData[QStringLiteral("placeName")].isEmpty()) + if (!info.rgData[QLatin1String("placeName")].isEmpty()) { - result =3D info.rgData[QStringLiteral("placeName")]; - returnedFormat.append(QStringLiteral("/{City}")); + result =3D info.rgData[QLatin1String("placeName")]; + returnedFormat.append(QLatin1String("/{City}")); dataAdded =3D true; } } @@ -213,35 +213,35 @@ QStringList makeTagString(const RGInfo& info,const QS= tring& inputFormat,const QS { returnedAddress.replace(indexFBracket - 1, indexLBracket - indexFBracket + 2, - QStringLiteral("")); + QLatin1String("")); = - int indexFormatFBracket =3D auxReturnedFormat.indexOf(QStr= ingLiteral("{")); - int indexFormatLBracket =3D auxReturnedFormat.indexOf(QStr= ingLiteral("}")); + int indexFormatFBracket =3D auxReturnedFormat.indexOf(QLat= in1String("{")); + int indexFormatLBracket =3D auxReturnedFormat.indexOf(QLat= in1String("}")); auxReturnedFormat.replace(indexFormatFBracket - 1, indexFormatLBracket - indexForma= tFBracket + 2, - QStringLiteral("")); + QLatin1String("")); dataAdded =3D true; } } = - else if (backendName =3D=3D QStringLiteral("Geonames")) + else if (backendName =3D=3D QLatin1String("Geonames")) { - if (humanTag.compare(QStringLiteral("Country")) =3D=3D 0) + if (humanTag.compare(QLatin1String("Country")) =3D=3D 0) { - if (!info.rgData[QStringLiteral("countryName")].isEmpty()) + if (!info.rgData[QLatin1String("countryName")].isEmpty()) { - result =3D info.rgData[QStringLiteral("countryName"= )]; - returnedFormat.append(QStringLiteral("/{Country}")); + result =3D info.rgData[QLatin1String("countryName")= ]; + returnedFormat.append(QLatin1String("/{Country}")); dataAdded =3D true; } } = - else if (humanTag =3D=3D QStringLiteral("Place")) + else if (humanTag =3D=3D QLatin1String("Place")) { - if (!info.rgData[QStringLiteral("name")].isEmpty()) + if (!info.rgData[QLatin1String("name")].isEmpty()) { - result =3D info.rgData[QStringLiteral("name")]; - returnedFormat.append(QStringLiteral("/{Place}")); + result =3D info.rgData[QLatin1String("name")]; + returnedFormat.append(QLatin1String("/{Place}")); dataAdded =3D true; } } @@ -249,20 +249,20 @@ QStringList makeTagString(const RGInfo& info,const QS= tring& inputFormat,const QS { returnedAddress.replace(indexFBracket - 1, indexLBracket - indexFBracket + 2, - QStringLiteral("")); + QLatin1String("")); = - int indexFormatFBracket =3D auxReturnedFormat.indexOf(QStr= ingLiteral("{")); - int indexFormatLBracket =3D auxReturnedFormat.indexOf(QStr= ingLiteral("}")); + int indexFormatFBracket =3D auxReturnedFormat.indexOf(QLat= in1String("{")); + int indexFormatLBracket =3D auxReturnedFormat.indexOf(QLat= in1String("}")); auxReturnedFormat.replace(indexFormatFBracket - 1, indexFormatLBracket - indexForma= tFBracket + 2, - QStringLiteral("")); + QLatin1String("")); dataAdded =3D true; } } = if (!dataAdded) { - returnedAddress.replace(indexFBracket - 1, humanTag.length() += 3, QStringLiteral("")); + returnedAddress.replace(indexFBracket - 1, humanTag.length() += 3, QLatin1String("")); } else {