diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 768ea7d2e..a7d036a16 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -748,6 +748,7 @@ void MainApplication::saveSettings() m_searchEnginesManager->saveSettings(); m_plugins->shutdown(); + m_networkManager->shutdown(); DataPaths::clearTempData(); diff --git a/src/lib/network/networkmanager.cpp b/src/lib/network/networkmanager.cpp index 08821b55e..1b0fb6677 100644 --- a/src/lib/network/networkmanager.cpp +++ b/src/lib/network/networkmanager.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2016 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -249,6 +249,11 @@ void NetworkManager::loadSettings() m_urlInterceptor->loadSettings(); } +void NetworkManager::shutdown() +{ + mApp->webProfile()->setRequestInterceptor(nullptr); +} + QNetworkReply *NetworkManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData) { QNetworkRequest req = request; diff --git a/src/lib/network/networkmanager.h b/src/lib/network/networkmanager.h index b6ddd32aa..7bfaff994 100644 --- a/src/lib/network/networkmanager.h +++ b/src/lib/network/networkmanager.h @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2016 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,6 +41,7 @@ public: void removeUrlInterceptor(UrlInterceptor *interceptor); void loadSettings(); + void shutdown(); protected: QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) Q_DECL_OVERRIDE;