From 68dc1f5e318ae59bc80690d525de35e6af5802ec Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 18 Jun 2019 12:33:56 +0200 Subject: [PATCH] [libcalamares] Warn about badly-configured GeoIP - Warn when type will be none - Re-order warnings from general to specific --- src/libcalamares/geoip/Handler.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/libcalamares/geoip/Handler.cpp b/src/libcalamares/geoip/Handler.cpp index 192ab1a7c..df033f476 100644 --- a/src/libcalamares/geoip/Handler.cpp +++ b/src/libcalamares/geoip/Handler.cpp @@ -64,17 +64,21 @@ Handler::Handler( const QString& implementation, const QString& url, const QStri { bool ok = false; m_type = handlerTypes().find( implementation, ok ); + if ( !ok ) + { + cWarning() << "GeoIP style" << implementation << "is not recognized."; + } + else if ( m_type == Type::None ) + { + cWarning() << "GeoIP style *none* does not do anything."; + } #if !defined(QT_XML_LIB) - if ( m_type == Type::XML ) + else if ( m_type == Type::XML ) { m_type = Type::None; - cWarning() << "GeoIP style XML is not supported in this version of Calamares."; + cWarning() << "GeoIP style *xml* is not supported in this version of Calamares."; } #endif - if ( !ok ) - { - cWarning() << "GeoIP Style" << implementation << "is not recognized."; - } } Handler::~Handler()