libcalamares*: adapt consumers of network manager
This commit is contained in:
parent
35998066c2
commit
8ebba4fcff
@ -186,8 +186,7 @@ GeoIPTests::testSplitTZ()
|
||||
|
||||
#define CHECK_GET( t, selector, url ) \
|
||||
{ \
|
||||
auto tz = GeoIP##t( selector ) \
|
||||
.processReply( Calamares::Network::Manager::instance().synchronousGet( QUrl( url ) ) ); \
|
||||
auto tz = GeoIP##t( selector ).processReply( Calamares::Network::Manager().synchronousGet( QUrl( url ) ) ); \
|
||||
qDebug() << tz; \
|
||||
QCOMPARE( default_tz, tz ); \
|
||||
auto tz2 = Calamares::GeoIP::Handler( "" #t, url, selector ).get(); \
|
||||
@ -207,7 +206,7 @@ GeoIPTests::testGet()
|
||||
GeoIPJSON default_handler;
|
||||
// Call the KDE service the definitive source.
|
||||
auto default_tz = default_handler.processReply(
|
||||
Calamares::Network::Manager::instance().synchronousGet( QUrl( "https://geoip.kde.org/v1/calamares" ) ) );
|
||||
Calamares::Network::Manager().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") );
|
||||
|
@ -115,7 +115,7 @@ do_query( Handler::Type type, const QString& url, const QString& selector )
|
||||
|
||||
using namespace Calamares::Network;
|
||||
return interface->processReply(
|
||||
Calamares::Network::Manager::instance().synchronousGet( url, { RequestOptions::FakeUserAgent } ) );
|
||||
Calamares::Network::Manager().synchronousGet( url, { RequestOptions::FakeUserAgent } ) );
|
||||
}
|
||||
|
||||
static QString
|
||||
@ -129,7 +129,7 @@ do_raw_query( Handler::Type type, const QString& url, const QString& selector )
|
||||
|
||||
using namespace Calamares::Network;
|
||||
return interface->rawReply(
|
||||
Calamares::Network::Manager::instance().synchronousGet( url, { RequestOptions::FakeUserAgent } ) );
|
||||
Calamares::Network::Manager().synchronousGet( url, { RequestOptions::FakeUserAgent } ) );
|
||||
}
|
||||
|
||||
RegionZonePair
|
||||
|
@ -247,7 +247,7 @@ registerQmlModels()
|
||||
0,
|
||||
"Network",
|
||||
[]( QQmlEngine*, QJSEngine* ) -> QObject*
|
||||
{ return &Calamares::Network::Manager::instance(); } );
|
||||
{ return new Calamares::Network::Manager; } );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ TestPaste::testUploadSize()
|
||||
QVERIFY( !s.isEmpty() );
|
||||
|
||||
QUrl url( s );
|
||||
QByteArray returnedData = Calamares::Network::Manager::instance().synchronousGet( url );
|
||||
QByteArray returnedData = Calamares::Network::Manager().synchronousGet( url );
|
||||
|
||||
QCOMPARE( returnedData.size(), 100 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user