From 0c1453ff1812cb672c06aa4e8cc0ac748df6f917 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 12 Apr 2018 16:05:38 -0400 Subject: [PATCH] [locale] Fix string value handled by XML parser --- src/modules/locale/GeoIPXML.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/locale/GeoIPXML.cpp b/src/modules/locale/GeoIPXML.cpp index 1bba559d0..f6b3ff342 100644 --- a/src/modules/locale/GeoIPXML.cpp +++ b/src/modules/locale/GeoIPXML.cpp @@ -36,10 +36,8 @@ XMLGeoIP::processReply( const QByteArray& data ) cDebug() << "GeoIP found" << tzElements.length() << "elements"; for ( int it = 0; it < tzElements.length(); ++it ) { - if ( tzElements.at(it).isText() ) - { - return splitTZString( tzElements.at(it).nodeValue() ); - } + auto e = tzElements.at(it).toElement(); + return splitTZString( e.text() ); } } else