Commit 5a45888a authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use const ref instead of deep copies of OsmPlacemarkData

parent ae0bc841
......@@ -189,7 +189,7 @@ void MarbleWidgetPopupMenu::Private::setupDialogOsm( PopupLayer *popup, const Ge
}
QString description = descriptionFile.readAll();
OsmPlacemarkData data = placemark->osmData();
const OsmPlacemarkData& data = placemark->osmData();
if (!data.containsTagKey("addr:street") && !data.containsTagKey("addr:housenumber")){
description.replace(QStringLiteral("<br> %postcode%"), QStringLiteral("%postcode%"));
}
......@@ -646,7 +646,7 @@ void MarbleWidgetPopupMenu::slotInfoDialog()
bool isCity = false;
bool isNation = false;
OsmPlacemarkData data = placemark->osmData();
const OsmPlacemarkData& data = placemark->osmData();
bool hasOsmData = false;
......
......@@ -180,7 +180,7 @@ QString Placemark::elevation() const
return m_elevation;
}
OsmPlacemarkData data = m_placemark.osmData();
const OsmPlacemarkData& data = m_placemark.osmData();
if (data.containsTagKey("ele")) {
m_elevation = data.tagValue("ele");
......@@ -195,7 +195,7 @@ QString Placemark::amenity() const
return m_amenity;
}
OsmPlacemarkData data = m_placemark.osmData();
const OsmPlacemarkData& data = m_placemark.osmData();
if (data.containsTagKey("amenity") && !data.tagValue("amenity").isEmpty()){
QString amenity = data.tagValue("amenity");
......@@ -212,7 +212,7 @@ QString Placemark::shop() const
return m_shop;
}
OsmPlacemarkData data = m_placemark.osmData();
const OsmPlacemarkData& data = m_placemark.osmData();
if (data.containsTagKey("shop") && !data.tagValue("shop").isEmpty()){
QString shop = data.tagValue("shop");
......
......@@ -64,7 +64,7 @@ void OsmTagEditorWidgetPrivate::populateCurrentTagsList()
// Other tags
if( m_placemark->hasOsmData() ) {
OsmPlacemarkData osmData = m_placemark->osmData();
const OsmPlacemarkData& osmData = m_placemark->osmData();
QHash< QString, QString>::const_iterator it = osmData.tagsBegin();
QHash< QString, QString>::const_iterator end = osmData.tagsEnd();
for ( ; it != end; ++it ) {
......
Supports Markdown
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