diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-18 21:26:43 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-18 21:26:43 +0200 |
commit | 6b355d1aa87072143e09ea5269e8cf465318a64f (patch) | |
tree | 5de8b227d319e8c677ef4ea3d7931233a808bd5a /lib/networkaccessmanager.cpp | |
parent | 2dd85770cbfd6d9c7506757f25765c05ef74987d (diff) | |
download | libquotient-6b355d1aa87072143e09ea5269e8cf465318a64f.tar.gz libquotient-6b355d1aa87072143e09ea5269e8cf465318a64f.zip |
Drop pre-Qt 5.15 code
Diffstat (limited to 'lib/networkaccessmanager.cpp')
-rw-r--r-- | lib/networkaccessmanager.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/networkaccessmanager.cpp b/lib/networkaccessmanager.cpp index f4e7b1af..38ab07cc 100644 --- a/lib/networkaccessmanager.cpp +++ b/lib/networkaccessmanager.cpp @@ -68,24 +68,11 @@ void NetworkAccessManager::clearIgnoredSslErrors() d->ignoredSslErrors.clear(); } -static NetworkAccessManager* createNam() -{ - auto nam = new NetworkAccessManager(); -#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0)) - // See #109; in newer Qt, bearer management is deprecated altogether - NetworkAccessManager::connect(nam, - &QNetworkAccessManager::networkAccessibleChanged, [nam] { - nam->setNetworkAccessible(QNetworkAccessManager::Accessible); - }); -#endif - return nam; -} - NetworkAccessManager* NetworkAccessManager::instance() { static QThreadStorage<NetworkAccessManager*> storage; if(!storage.hasLocalData()) { - storage.setLocalData(createNam()); + storage.setLocalData(new NetworkAccessManager()); } return storage.localData(); } |