diff options
-rw-r--r-- | connectiondata.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/connectiondata.cpp b/connectiondata.cpp index 5b6ac71d..a982ed3e 100644 --- a/connectiondata.cpp +++ b/connectiondata.cpp @@ -26,7 +26,14 @@ using namespace QMatrixClient; QNetworkAccessManager* createNam() { - return new QNetworkAccessManager(); + auto nam = new QNetworkAccessManager(); + // See #109. Once Qt bearer management gets better, this workaround + // should become unnecessary. + nam->connect(nam, &QNetworkAccessManager::networkAccessibleChanged, + nam, [=] { + nam->setNetworkAccessible(QNetworkAccessManager::Accessible); + }); + return nam; } struct ConnectionData::Private |