From 79a6d7ccbdfa13e5399afc79adfc8ce8af82c346 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 16 Apr 2018 04:35:32 -0400 Subject: [PATCH] [locale] Make file and class consistent GeoIPXML - Rename the class to match the filename. --- src/modules/locale/GeoIPTests.cpp | 6 +++--- src/modules/locale/GeoIPXML.cpp | 2 +- src/modules/locale/GeoIPXML.h | 2 +- src/modules/locale/LocaleViewStep.cpp | 2 +- src/modules/locale/test_geoip.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/locale/GeoIPTests.cpp b/src/modules/locale/GeoIPTests.cpp index 4f946b8b7..d4522836c 100644 --- a/src/modules/locale/GeoIPTests.cpp +++ b/src/modules/locale/GeoIPTests.cpp @@ -100,7 +100,7 @@ GeoIPTests::testXML() )"; #ifdef HAVE_XML - XMLGeoIP handler; + GeoIPXML handler; auto tz = handler.processReply( data ); QCOMPARE( tz.first, QLatin1String( "Europe" ) ); @@ -115,7 +115,7 @@ GeoIPTests::testXML2() "America/North Dakota/Beulah"; #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() ); diff --git a/src/modules/locale/GeoIPXML.cpp b/src/modules/locale/GeoIPXML.cpp index a0f9b7a2d..28761e163 100644 --- a/src/modules/locale/GeoIPXML.cpp +++ b/src/modules/locale/GeoIPXML.cpp @@ -24,7 +24,7 @@ #include GeoIP::RegionZonePair -XMLGeoIP::processReply( const QByteArray& data ) +GeoIPXML::processReply( const QByteArray& data ) { QString domError; int errorLine, errorColumn; diff --git a/src/modules/locale/GeoIPXML.h b/src/modules/locale/GeoIPXML.h index 8eec22a75..adffc5bca 100644 --- a/src/modules/locale/GeoIPXML.h +++ b/src/modules/locale/GeoIPXML.h @@ -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& ); } ; diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 243ad436c..73121581c 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -133,7 +133,7 @@ LocaleViewStep::fetchGeoIpTimezone() #if defined(HAVE_XML) else if ( m_geoipStyle == "xml" ) { - handler = new XMLGeoIP; + handler = new GeoIPXML; } #endif else diff --git a/src/modules/locale/test_geoip.cpp b/src/modules/locale/test_geoip.cpp index 70c205b40..7b6584f0c 100644 --- a/src/modules/locale/test_geoip.cpp +++ b/src/modules/locale/test_geoip.cpp @@ -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 )