diff --git a/src/libcalamares/geoip/GeoIPTests.cpp b/src/libcalamares/geoip/GeoIPTests.cpp index 3400bb24f..4b1f8f8e1 100644 --- a/src/libcalamares/geoip/GeoIPTests.cpp +++ b/src/libcalamares/geoip/GeoIPTests.cpp @@ -197,7 +197,8 @@ GeoIPTests::testSplitTZ() #define CHECK_GET( t, selector, url ) \ { \ - auto tz = GeoIP##t( selector ).processReply( CalamaresUtils::Network::Manager::instance().synchronousGet( QUrl( url ) ) ); \ + auto tz = GeoIP##t( selector ) \ + .processReply( CalamaresUtils::Network::Manager::instance().synchronousGet( QUrl( url ) ) ); \ qDebug() << tz; \ QCOMPARE( default_tz, tz ); \ auto tz2 = CalamaresUtils::GeoIP::Handler( "" #t, url, selector ).get(); \ @@ -216,7 +217,8 @@ GeoIPTests::testGet() GeoIPJSON default_handler; // Call the KDE service the definitive source. - auto default_tz = default_handler.processReply( CalamaresUtils::Network::Manager::instance().synchronousGet( QUrl( "https://geoip.kde.org/v1/calamares" ) ) ); + auto default_tz = default_handler.processReply( + CalamaresUtils::Network::Manager::instance().synchronousGet( QUrl( "https://geoip.kde.org/v1/calamares" ) ) ); // This is bogus, because the test isn't always run by me // QCOMPARE( default_tz.first, QStringLiteral("Europe") ); diff --git a/src/libcalamares/geoip/GeoIPXML.cpp b/src/libcalamares/geoip/GeoIPXML.cpp index 256e774cf..2a97c5546 100644 --- a/src/libcalamares/geoip/GeoIPXML.cpp +++ b/src/libcalamares/geoip/GeoIPXML.cpp @@ -73,10 +73,12 @@ QString GeoIPXML::rawReply( const QByteArray& data ) { for ( const auto& e : getElementTexts( data, m_element ) ) + { if ( !e.isEmpty() ) { return e; } + } return QString(); }