[libcalamares] Apply coding style to geoip/

main
Adriaan de Groot 5 years ago
parent 01c4383178
commit 88fc6685ba

@ -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") );

@ -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();
}

Loading…
Cancel
Save