[locale] Make file and class consistent GeoIPXML

- Rename the class to match the filename.
main
Adriaan de Groot 7 years ago
parent 2cd4461b57
commit 79a6d7ccbd

@ -100,7 +100,7 @@ GeoIPTests::testXML()
</Response>)";
#ifdef HAVE_XML
XMLGeoIP handler;
GeoIPXML handler;
auto tz = handler.processReply( data );
QCOMPARE( tz.first, QLatin1String( "Europe" ) );
@ -115,7 +115,7 @@ GeoIPTests::testXML2()
"<Response><TimeZone>America/North Dakota/Beulah</TimeZone></Response>";
#ifdef HAVE_XML
XMLGeoIP handler;
GeoIPXML handler;
auto tz = handler.processReply( data );
QCOMPARE( tz.first, QLatin1String( "America" ) );
@ -127,7 +127,7 @@ void
GeoIPTests::testXMLbad()
{
#ifdef HAVE_XML
XMLGeoIP handler;
GeoIPXML handler;
auto tz = handler.processReply( "{time_zone: \"Europe/Paris\"}" );
QCOMPARE( tz.first, QString() );

@ -24,7 +24,7 @@
#include <QtXml/QDomDocument>
GeoIP::RegionZonePair
XMLGeoIP::processReply( const QByteArray& data )
GeoIPXML::processReply( const QByteArray& data )
{
QString domError;
int errorLine, errorColumn;

@ -28,7 +28,7 @@
* element, which contains the text (string) for the region/zone. This
* format is expected by, e.g. the Ubiquity installer.
*/
struct XMLGeoIP : public GeoIP
struct GeoIPXML : public GeoIP
{
virtual RegionZonePair processReply( const QByteArray& );
} ;

@ -133,7 +133,7 @@ LocaleViewStep::fetchGeoIpTimezone()
#if defined(HAVE_XML)
else if ( m_geoipStyle == "xml" )
{
handler = new XMLGeoIP;
handler = new GeoIPXML;
}
#endif
else

@ -42,7 +42,7 @@ int main(int argc, char** argv)
handler = new GeoIPJSON;
#ifdef HAVE_XML
else if ( QLatin1String( "xml" ) == argv[1] )
handler = new XMLGeoIP;
handler = new GeoIPXML;
#endif
if ( !handler )

Loading…
Cancel
Save