Use QStringLiteral with GeoDataData constructor

parent cc3bcb4a
......@@ -264,12 +264,12 @@ GeoDataPlacemark EditBookmarkDialog::bookmark() const
bookmark.setAbstractView( lookat );
}
bookmark.extendedData().addValue( GeoDataData( "isBookmark", true ) );
bookmark.extendedData().addValue(GeoDataData(QStringLiteral("isBookmark"), true));
if(d->m_widget != 0) {
const QString celestialName = d->m_widget->model()->planetId();
if (celestialName != QLatin1String("earth")) {
bookmark.extendedData().addValue( GeoDataData( "celestialBody", celestialName ) );
bookmark.extendedData().addValue(GeoDataData(QStringLiteral("celestialBody"), celestialName));
}
}
......
......@@ -51,7 +51,7 @@ OsmRelationEditorDialog::OsmRelationEditorDialog( OsmPlacemarkData *relationData
// "osmRelaation=yes" entry is added to its ExtendedData to let the widget know
// its special relation status
GeoDataExtendedData extendedData;
extendedData.addValue( GeoDataData( "osmRelation", "yes" ) );
extendedData.addValue(GeoDataData(QStringLiteral("osmRelation"), QStringLiteral("yes")));
m_dummyPlacemark->setExtendedData( extendedData );
m_dummyPlacemark->setOsmData( *m_relationData );
OsmObjectManager::initializeOsmData( m_dummyPlacemark );
......
......@@ -300,7 +300,7 @@ QString RouteRequest::name( int index ) const
void RouteRequest::setVisited( int index, bool visited )
{
if ( index >= 0 && index < d->m_route.size() ) {
d->m_route[index].extendedData().addValue( GeoDataData( "routingVisited", visited ) );
d->m_route[index].extendedData().addValue(GeoDataData(QStringLiteral("routingVisited"), visited));
QMap<PixmapElement, QPixmap>::iterator iter = d->m_pixmapCache.begin();
while ( iter != d->m_pixmapCache.end() ) {
if ( iter.key().index == index ) {
......
......@@ -107,7 +107,7 @@ void GosmoreRunner::reverseGeocoding( const GeoDataCoordinates &coordinates )
QString road = fields.last().trimmed();
placemark.setAddress( road );
GeoDataExtendedData extendedData;
extendedData.addValue( GeoDataData( "road", road ) );
extendedData.addValue(GeoDataData(QStringLiteral("road"), road));
placemark.setExtendedData( extendedData );
}
}
......
......@@ -125,12 +125,12 @@ void OsmNominatimRunner::handleResult( QNetworkReply* reply )
OsmPlacemarkData data;
GeoDataExtendedData placemarkData = extractChildren(place);
placemarkData.addValue( GeoDataData( "class", key ) );
placemarkData.addValue( GeoDataData( "type", value ) );
placemarkData.addValue(GeoDataData(QStringLiteral("class"), key));
placemarkData.addValue(GeoDataData(QStringLiteral("type"), value));
QString name = place.firstChildElement(value).text();
QString road = place.firstChildElement("road").text();
placemarkData.addValue( GeoDataData( "name", name ) );
placemarkData.addValue(GeoDataData(QStringLiteral("name"), name));
QString city = place.firstChildElement("city").text();
if( city.isEmpty() ) {
......
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