summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-02-04 17:09:30 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-04 22:06:36 +0100
commit9b78a26acd384ee9d2bb7895e60cd182110297bf (patch)
tree1477cb5cdaea186c44df3f03df6f799f63d47db2 /src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
parent53cdda75a98b1d307294b7d773f61b1809b8ac0e (diff)
downloadqtlocation-9b78a26acd384ee9d2bb7895e60cd182110297bf.tar.gz
Fix QGeoRouteXmlParser test.
The TravelTime element is a double, which was failing to be parsed by QString::toInt(). Fixed by using QString::toDouble() and rounding the result. Change-Id: I012c277f1efdb3811a50eff96519a4d0d9959a67 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp')
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp b/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
index cd8a4bad..60840ec6 100644
--- a/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
+++ b/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
@@ -435,7 +435,7 @@ bool QGeoRouteXmlParser::parseManeuver()
} else if (m_reader->name() == "ToLink") {
maneuverContainter.toId = m_reader->readElementText();
} else if (m_reader->name() == "TravelTime") {
- maneuverContainter.maneuver.setTimeToNextInstruction(m_reader->readElementText().toInt());
+ maneuverContainter.maneuver.setTimeToNextInstruction(qRound(m_reader->readElementText().toDouble()));
} else if (m_reader->name() == "Length") {
maneuverContainter.maneuver.setDistanceToNextInstruction(m_reader->readElementText().toDouble());
} else if (m_reader->name() == "Direction") {