diff options
Diffstat (limited to 'lib/networkaccessmanager.cpp')
-rw-r--r-- | lib/networkaccessmanager.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/networkaccessmanager.cpp b/lib/networkaccessmanager.cpp index 7d9cb360..7bff654c 100644 --- a/lib/networkaccessmanager.cpp +++ b/lib/networkaccessmanager.cpp @@ -13,25 +13,24 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "networkaccessmanager.h" -#include <QtNetwork/QNetworkReply> #include <QtCore/QCoreApplication> +#include <QtNetwork/QNetworkReply> using namespace QMatrixClient; -class NetworkAccessManager::Private -{ - public: - QList<QSslError> ignoredSslErrors; +class NetworkAccessManager::Private { +public: + QList<QSslError> ignoredSslErrors; }; NetworkAccessManager::NetworkAccessManager(QObject* parent) : QNetworkAccessManager(parent), d(std::make_unique<Private>()) -{ } +{} QList<QSslError> NetworkAccessManager::ignoredSslErrors() const { @@ -53,8 +52,9 @@ static NetworkAccessManager* createNam() auto nam = new NetworkAccessManager(QCoreApplication::instance()); // See #109. Once Qt bearer management gets better, this workaround // should become unnecessary. - nam->connect(nam, &QNetworkAccessManager::networkAccessibleChanged, - [nam] { nam->setNetworkAccessible(QNetworkAccessManager::Accessible); }); + nam->connect(nam, &QNetworkAccessManager::networkAccessibleChanged, [nam] { + nam->setNetworkAccessible(QNetworkAccessManager::Accessible); + }); return nam; } @@ -66,11 +66,10 @@ NetworkAccessManager* NetworkAccessManager::instance() NetworkAccessManager::~NetworkAccessManager() = default; -QNetworkReply* NetworkAccessManager::createRequest(Operation op, - const QNetworkRequest& request, QIODevice* outgoingData) +QNetworkReply* NetworkAccessManager::createRequest( + Operation op, const QNetworkRequest& request, QIODevice* outgoingData) { - auto reply = - QNetworkAccessManager::createRequest(op, request, outgoingData); + auto reply = QNetworkAccessManager::createRequest(op, request, outgoingData); reply->ignoreSslErrors(d->ignoredSslErrors); return reply; } |