summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp
diff options
context:
space:
mode:
authorvladimirb <vladimir.bezkorovainyi@nokia.com>2012-05-22 14:03:41 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-25 13:48:40 +0200
commit8f6028b8c208dbe47145aabe80c767b7878d949c (patch)
tree2a20510f2a4f69a5dafa7b43906d976d76230b22 /src/plugins/geoservices/nokia/qgeocodexmlparser.cpp
parentc8ba042b5bc353c7bc3140e80287e2d5a79ea2f7 (diff)
downloadqtlocation-8f6028b8c208dbe47145aabe80c767b7878d949c.tar.gz
Prevent implicit copying raw pointers, which lead to double pointer deletion
Change-Id: I293fbda64138319bf12ebbea5d26b5b113d06351 Reviewed-by: Jean Gressmann <jean.gressmann@nokia.com>
Diffstat (limited to 'src/plugins/geoservices/nokia/qgeocodexmlparser.cpp')
-rw-r--r--src/plugins/geoservices/nokia/qgeocodexmlparser.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp b/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp
index 9e35b90f..c3de21ec 100644
--- a/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp
+++ b/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp
@@ -51,22 +51,21 @@
#include <QXmlStreamReader>
#include <QIODevice>
+#include <qgeolocation.h>
+
QT_BEGIN_NAMESPACE
QGeoCodeXmlParser::QGeoCodeXmlParser()
- : m_reader(0)
{
}
QGeoCodeXmlParser::~QGeoCodeXmlParser()
{
- delete m_reader;
}
bool QGeoCodeXmlParser::parse(QIODevice *source)
{
- delete m_reader;
- m_reader = new QXmlStreamReader(source);
+ m_reader.reset(new QXmlStreamReader(source));
if (!parseRootElement()) {
m_errorString = m_reader->errorString();