diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index 7ef9843b9..ae702a8b3 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -79,7 +79,6 @@ find_package(Qt5 COMPONENTS Xml) if( Qt5Xml_FOUND ) list( APPEND geoipSources geoip/GeoIPXML.cpp ) list( APPEND geoip_libs Qt5::Network Qt5::Xml ) - add_definitions( -DHAVE_XML ) endif() add_library( calamares SHARED ${libSources} ${kdsagSources} ${utilsSources} ${geoipSources} ) diff --git a/src/libcalamares/geoip/GeoIPTests.cpp b/src/libcalamares/geoip/GeoIPTests.cpp index af114611e..9a8070148 100644 --- a/src/libcalamares/geoip/GeoIPTests.cpp +++ b/src/libcalamares/geoip/GeoIPTests.cpp @@ -19,7 +19,7 @@ #include "GeoIPTests.h" #include "GeoIPJSON.h" -#ifdef HAVE_XML +#ifdef QT_XML_LIB #include "GeoIPXML.h" #endif @@ -118,7 +118,7 @@ static const char xml_data_ubiquity[] = void GeoIPTests::testXML() { -#ifdef HAVE_XML +#ifdef QT_XML_LIB GeoIPXML handler; auto tz = handler.processReply( xml_data_ubiquity ); @@ -133,7 +133,7 @@ GeoIPTests::testXML2() static const char data[] = "America/North Dakota/Beulah"; // With a space! -#ifdef HAVE_XML +#ifdef QT_XML_LIB GeoIPXML handler; auto tz = handler.processReply( data ); @@ -145,7 +145,7 @@ GeoIPTests::testXML2() void GeoIPTests::testXMLalt() { -#ifdef HAVE_XML +#ifdef QT_XML_LIB GeoIPXML handler( "ZT" ); auto tz = handler.processReply( "Moon/Dark_side" ); @@ -157,7 +157,7 @@ void GeoIPTests::testXMLalt() void GeoIPTests::testXMLbad() { -#ifdef HAVE_XML +#ifdef QT_XML_LIB GeoIPXML handler; auto tz = handler.processReply( "{time_zone: \"Europe/Paris\"}" ); QCOMPARE( tz.first, QString() ); @@ -249,7 +249,7 @@ void GeoIPTests::testGet() CHECK_GET( JSON, QStringLiteral("Location.TimeZone"), "https://geoip.kde.org/debug" ) // 2-level JSON -#ifdef HAVE_XML +#ifdef QT_XML_LIB CHECK_GET( XML, QString(), "http://geoip.ubuntu.com/lookup" ) // Ubiquity's XML format CHECK_GET( XML, QString(), "https://geoip.kde.org/v1/ubiquity" ) // Temporary KDE service #endif diff --git a/src/libcalamares/geoip/test_geoip.cpp b/src/libcalamares/geoip/test_geoip.cpp index 89c1b6030..8b8c2b0dc 100644 --- a/src/libcalamares/geoip/test_geoip.cpp +++ b/src/libcalamares/geoip/test_geoip.cpp @@ -23,7 +23,7 @@ #include #include "GeoIPJSON.h" -#ifdef HAVE_XML +#ifdef QT_XML_LIB #include "GeoIPXML.h" #endif @@ -40,7 +40,7 @@ int main(int argc, char** argv) GeoIP* handler = nullptr; if ( QStringLiteral( "json" ) == argv[1] ) handler = new GeoIPJSON; -#ifdef HAVE_XML +#ifdef QT_XML_LIB else if ( QStringLiteral( "xml" ) == argv[1] ) handler = new GeoIPXML; #endif diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 104abbfc2..eb3d49960 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -28,7 +28,7 @@ #include "geoip/GeoIP.h" #include "geoip/GeoIPJSON.h" -#ifdef HAVE_XML +#ifdef QT_XML_LIB #include "geoip/GeoIPXML.h" #endif @@ -129,7 +129,7 @@ LocaleViewStep::fetchGeoIpTimezone() { handler = new GeoIPJSON( m_geoipSelector ); } -#if defined(HAVE_XML) +#if defined(QT_XML_LIB) else if ( m_geoipStyle == "xml" ) { handler = new GeoIPXML( m_geoipSelector );