aboutsummaryrefslogtreecommitdiff
path: root/lib/networkaccessmanager.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-23 10:28:59 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-23 10:29:17 +0200
commitd7820ada21fb29b273a68a5ea69477ef5763d5de (patch)
tree9cbe806eb6a9ffe90eae429cfb8f1ee7cf9ea6c5 /lib/networkaccessmanager.cpp
parent1cf07ee56315af86cadccc977948e9ed1d51da1a (diff)
downloadlibquotient-d7820ada21fb29b273a68a5ea69477ef5763d5de.tar.gz
libquotient-d7820ada21fb29b273a68a5ea69477ef5763d5de.zip
More cleanup; drop Qt bearer management on Qt 5.15+
Qt 5.15 deprecates bearer management.
Diffstat (limited to 'lib/networkaccessmanager.cpp')
-rw-r--r--lib/networkaccessmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/networkaccessmanager.cpp b/lib/networkaccessmanager.cpp
index 8ee080bf..b9037bcc 100644
--- a/lib/networkaccessmanager.cpp
+++ b/lib/networkaccessmanager.cpp
@@ -50,11 +50,12 @@ void NetworkAccessManager::clearIgnoredSslErrors()
static NetworkAccessManager* createNam()
{
auto nam = new NetworkAccessManager(QCoreApplication::instance());
- // See #109. Once Qt bearer management gets better, this workaround
- // should become unnecessary.
+#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
+ // See #109; in newer Qt, bearer management is deprecated altogether
nam->connect(nam, &QNetworkAccessManager::networkAccessibleChanged, [nam] {
nam->setNetworkAccessible(QNetworkAccessManager::Accessible);
});
+#endif
return nam;
}