diff options
author | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2020-03-04 16:33:51 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-04-05 16:41:08 +0200 |
commit | d8b49e6b51007d6f0a9faec82a66b95dc7ccf541 (patch) | |
tree | a99632bb0a43abd29f824806fccf790b144c3d0e /tests/auto/network/access | |
parent | 430232e44d5e6c7d7fd7ca3ebebb06d74e21ce2f (diff) |
QtNetwork: Delete bearer management
All remaining pieces are gone, configuration included.
Relevant CMakeLists and configure.cmake were regenerated.
Fixes: QTBUG-76502
Change-Id: I667b5da7e3802830d236d50b5e9190c2ee9c19e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/network/access')
-rw-r--r-- | tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp | 21 | ||||
-rw-r--r-- | tests/auto/network/access/qftp/tst_qftp.cpp | 57 |
2 files changed, 2 insertions, 76 deletions
diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp index 182e3e9547..b6be01d900 100644 --- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp +++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp @@ -31,12 +31,6 @@ #include <QtNetwork/QtNetwork> #include "../../../network-settings.h" -#ifndef QT_NO_BEARERMANAGEMENT -#include <QtNetwork/qnetworkconfigmanager.h> -#include <QtNetwork/qnetworkconfiguration.h> -#include <QtNetwork/qnetworksession.h> -#endif - #include <algorithm> #define TESTFILE QLatin1String("http://") + QtNetworkSettings::httpServerName() + QLatin1String("/qtest/cgi-bin/") @@ -77,11 +71,6 @@ private: void runTest(); void checkSynchronous(); -#ifndef QT_NO_BEARERMANAGEMENT - QNetworkConfigurationManager *netConfMan; - QNetworkConfiguration networkConfiguration; - QScopedPointer<QNetworkSession> networkSession; -#endif }; class NetworkDiskCache : public QNetworkDiskCache @@ -133,16 +122,6 @@ void tst_QAbstractNetworkCache::initTestCase() if (!QtNetworkSettings::verifyTestNetworkSettings()) QSKIP("No network test server available"); #endif - -#ifndef QT_NO_BEARERMANAGEMENT - netConfMan = new QNetworkConfigurationManager(this); - networkConfiguration = netConfMan->defaultConfiguration(); - networkSession.reset(new QNetworkSession(networkConfiguration)); - if (!networkSession->isOpen()) { - networkSession->open(); - QVERIFY(networkSession->waitForOpened(30000)); - } -#endif } diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp index 60acb70af4..886a589324 100644 --- a/tests/auto/network/access/qftp/tst_qftp.cpp +++ b/tests/auto/network/access/qftp/tst_qftp.cpp @@ -37,10 +37,6 @@ #include <time.h> #include <stdlib.h> #include <QNetworkProxy> -#include <QNetworkConfiguration> -#include <qnetworkconfigmanager.h> -#include <QNetworkSession> -#include <QtNetwork/private/qnetworksession_p.h> #include <QTcpServer> #include <QHostInfo> #include <QElapsedTimer> @@ -66,7 +62,6 @@ public: private slots: void initTestCase_data(); void initTestCase(); - void cleanupTestCase(); void init(); void cleanup(); void connectToHost_data(); @@ -138,10 +133,6 @@ private: void renameCleanup( const QString &host, const QString &user, const QString &password, const QString &fileToDelete ); QFtp *ftp; -#ifndef QT_NO_BEARERMANAGEMENT - QSharedPointer<QNetworkSession> networkSessionExplicit; - QSharedPointer<QNetworkSession> networkSessionImplicit; -#endif QList<int> ids; // helper to make sure that all expected signals are emitted int current_id; @@ -190,21 +181,13 @@ void tst_QFtp::initTestCase_data() { QTest::addColumn<bool>("setProxy"); QTest::addColumn<int>("proxyType"); - QTest::addColumn<bool>("setSession"); - QTest::newRow("WithoutProxy") << false << 0 << false; + QTest::newRow("WithoutProxy") << false << 0; #if QT_CONFIG(socks5) - QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy) << false; + QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy); #endif //### doesn't work well yet. //QTest::newRow("WithHttpProxy") << true << int(QNetworkProxy::HttpProxy); - -#ifndef QT_NO_BEARERMANAGEMENT - QTest::newRow("WithoutProxyWithSession") << false << 0 << true; -#if QT_CONFIG(socks5) - QTest::newRow("WithSocks5ProxyAndSession") << true << int(QNetworkProxy::Socks5Proxy) << true; -#endif -#endif } void tst_QFtp::initTestCase() @@ -218,29 +201,14 @@ void tst_QFtp::initTestCase() if (!QtNetworkSettings::verifyTestNetworkSettings()) QSKIP("No network test server available"); #endif -#ifndef QT_NO_BEARERMANAGEMENT - QNetworkConfigurationManager manager; - networkSessionImplicit = QSharedPointer<QNetworkSession>::create(manager.defaultConfiguration()); - networkSessionImplicit->open(); - QVERIFY(networkSessionImplicit->waitForOpened(60000)); //there may be user prompt on 1st connect -#endif rfc3252File = QFINDTESTDATA("rfc3252.txt"); QVERIFY(!rfc3252File.isEmpty()); } -void tst_QFtp::cleanupTestCase() -{ -#ifndef QT_NO_BEARERMANAGEMENT - networkSessionExplicit.clear(); - networkSessionImplicit.clear(); -#endif -} - void tst_QFtp::init() { QFETCH_GLOBAL(bool, setProxy); QFETCH_GLOBAL(int, proxyType); - QFETCH_GLOBAL(bool, setSession); if (setProxy) { #ifndef QT_NO_NETWORKPROXY if (proxyType == QNetworkProxy::Socks5Proxy) { @@ -253,19 +221,6 @@ void tst_QFtp::init() QSKIP("No proxy support"); #endif // QT_NO_NETWORKPROXY } -#ifndef QT_NO_BEARERMANAGEMENT - if (setSession) { - networkSessionExplicit = networkSessionImplicit; - if (!networkSessionExplicit->isOpen()) { - networkSessionExplicit->open(); - QVERIFY(networkSessionExplicit->waitForOpened(30000)); - } - } else { - networkSessionExplicit.clear(); - } -#else - Q_UNUSED(setSession); -#endif delete ftp; ftp = 0; @@ -314,9 +269,6 @@ void tst_QFtp::cleanup() delete ftp; ftp = 0; -#ifndef QT_NO_BEARERMANAGEMENT - networkSessionExplicit.clear(); -#endif } void tst_QFtp::connectToHost_data() @@ -1947,11 +1899,6 @@ void tst_QFtp::dataTransferProgress( qint64 done, qint64 total ) QFtp *tst_QFtp::newFtp() { QFtp *nFtp = new QFtp( this ); -#ifndef QT_NO_BEARERMANAGEMENT - if (networkSessionExplicit) { - nFtp->setProperty("_q_networksession", QVariant::fromValue(networkSessionExplicit)); - } -#endif connect( nFtp, SIGNAL(commandStarted(int)), SLOT(commandStarted(int)) ); connect( nFtp, SIGNAL(commandFinished(int,bool)), |