summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-26 13:43:35 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-26 14:05:51 (GMT)
commit12e77e9929aa9758a830ab46d333510e43df4bd8 (patch)
treee3d6cd8e698693fabe86c3a1da6c073e8c6fe982
parentb154432d567f9917d4a86159ebddf3abc9378057 (diff)
Use QLatin1String with QXmlStreamAttributes::value
-rw-r--r--src/lib/marble/geodata/parser/GeoParser.cpp2
-rw-r--r--src/plugins/runner/gpx/handlers/GPXlinkTagHandler.cpp2
-rw-r--r--src/plugins/runner/gpx/handlers/GPXrteptTagHandler.cpp4
-rw-r--r--src/plugins/runner/gpx/handlers/GPXtrkptTagHandler.cpp4
-rw-r--r--src/plugins/runner/gpx/handlers/GPXwptTagHandler.cpp4
-rw-r--r--src/plugins/runner/osm/OsmRelation.cpp6
6 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/marble/geodata/parser/GeoParser.cpp b/src/lib/marble/geodata/parser/GeoParser.cpp
index 05cf062..06a8cd2 100644
--- a/src/lib/marble/geodata/parser/GeoParser.cpp
+++ b/src/lib/marble/geodata/parser/GeoParser.cpp
@@ -203,7 +203,7 @@ void GeoParser::raiseWarning( const QString& warning )
QString GeoParser::attribute( const char* attributeName ) const
{
- return attributes().value( QString::fromLatin1( attributeName )).toString();
+ return attributes().value(QLatin1String(attributeName)).toString();
}
GeoDocument* GeoParser::releaseDocument()
diff --git a/src/plugins/runner/gpx/handlers/GPXlinkTagHandler.cpp b/src/plugins/runner/gpx/handlers/GPXlinkTagHandler.cpp
index 9ccfb8c..5d917d3 100644
--- a/src/plugins/runner/gpx/handlers/GPXlinkTagHandler.cpp
+++ b/src/plugins/runner/gpx/handlers/GPXlinkTagHandler.cpp
@@ -40,7 +40,7 @@ GeoNode* GPXlinkTagHandler::parse(GeoParser& parser) const
GeoDataPlacemark* placemark = parentItem.nodeAs<GeoDataPlacemark>();
QXmlStreamAttributes attributes = parser.attributes();
- QString href = attributes.value("href").toString();
+ QString href = attributes.value(QLatin1String("href")).toString();
QString text = href;
if (parser.readNextStartElement())
{
diff --git a/src/plugins/runner/gpx/handlers/GPXrteptTagHandler.cpp b/src/plugins/runner/gpx/handlers/GPXrteptTagHandler.cpp
index 41731ce..f0209b9 100644
--- a/src/plugins/runner/gpx/handlers/GPXrteptTagHandler.cpp
+++ b/src/plugins/runner/gpx/handlers/GPXrteptTagHandler.cpp
@@ -50,12 +50,12 @@ GeoNode* GPXrteptTagHandler::parse(GeoParser& parser) const
QStringRef tmp;
qreal lat = 0;
qreal lon = 0;
- tmp = attributes.value(gpxTag_lat);
+ tmp = attributes.value(QLatin1String(gpxTag_lat));
if ( !tmp.isEmpty() )
{
lat = tmp.toString().toFloat();
}
- tmp = attributes.value(gpxTag_lon);
+ tmp = attributes.value(QLatin1String(gpxTag_lon));
if ( !tmp.isEmpty() )
{
lon = tmp.toString().toFloat();
diff --git a/src/plugins/runner/gpx/handlers/GPXtrkptTagHandler.cpp b/src/plugins/runner/gpx/handlers/GPXtrkptTagHandler.cpp
index dd25220..fc86305 100644
--- a/src/plugins/runner/gpx/handlers/GPXtrkptTagHandler.cpp
+++ b/src/plugins/runner/gpx/handlers/GPXtrkptTagHandler.cpp
@@ -47,12 +47,12 @@ GeoNode* GPXtrkptTagHandler::parse(GeoParser& parser) const
QStringRef tmp;
qreal lat = 0;
qreal lon = 0;
- tmp = attributes.value(gpxTag_lat);
+ tmp = attributes.value(QLatin1String(gpxTag_lat));
if ( !tmp.isEmpty() )
{
lat = tmp.toString().toDouble();
}
- tmp = attributes.value(gpxTag_lon);
+ tmp = attributes.value(QLatin1String(gpxTag_lon));
if ( !tmp.isEmpty() )
{
lon = tmp.toString().toDouble();
diff --git a/src/plugins/runner/gpx/handlers/GPXwptTagHandler.cpp b/src/plugins/runner/gpx/handlers/GPXwptTagHandler.cpp
index 19cebab..09f7546 100644
--- a/src/plugins/runner/gpx/handlers/GPXwptTagHandler.cpp
+++ b/src/plugins/runner/gpx/handlers/GPXwptTagHandler.cpp
@@ -47,12 +47,12 @@ GeoNode* GPXwptTagHandler::parse(GeoParser& parser) const
QStringRef tmp;
qreal lat = 0;
qreal lon = 0;
- tmp = attributes.value(gpxTag_lat);
+ tmp = attributes.value(QLatin1String(gpxTag_lat));
if ( !tmp.isEmpty() )
{
lat = tmp.toString().toFloat();
}
- tmp = attributes.value(gpxTag_lon);
+ tmp = attributes.value(QLatin1String(gpxTag_lon));
if ( !tmp.isEmpty() )
{
lon = tmp.toString().toFloat();
diff --git a/src/plugins/runner/osm/OsmRelation.cpp b/src/plugins/runner/osm/OsmRelation.cpp
index 89be54d..a4cfb25 100644
--- a/src/plugins/runner/osm/OsmRelation.cpp
+++ b/src/plugins/runner/osm/OsmRelation.cpp
@@ -34,9 +34,9 @@ const OsmPlacemarkData &OsmRelation::osmData() const
void OsmRelation::parseMember(const QXmlStreamAttributes &attributes)
{
- addMember(attributes.value("ref").toLongLong(),
- attributes.value("role").toString(),
- attributes.value("type").toString());
+ addMember(attributes.value(QLatin1String("ref")).toLongLong(),
+ attributes.value(QLatin1String("role")).toString(),
+ attributes.value(QLatin1String("type")).toString());
}
void OsmRelation::addMember(qint64 reference, const QString &role, const QString &type)