[locale] Make file and class consistent GeoIPXML

- Rename the class to match the filename.
This commit is contained in:
Adriaan de Groot 2018-04-16 04:35:32 -04:00
parent 2cd4461b57
commit 79a6d7ccbd
5 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

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