mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Properly destroy NetworkManager on application close.
This commit is contained in:
parent
6cf3cb637c
commit
a1ad8dab9b
@ -810,7 +810,7 @@ QWebSettings* MainApplication::webSettings()
|
||||
NetworkManager* MainApplication::networkManager()
|
||||
{
|
||||
if (!m_networkmanager) {
|
||||
m_networkmanager = new NetworkManager(getWindow());
|
||||
m_networkmanager = new NetworkManager(this);
|
||||
}
|
||||
return m_networkmanager;
|
||||
}
|
||||
|
@ -64,10 +64,9 @@ static QString fileNameForCert(const QSslCertificate &cert)
|
||||
return certFileName;
|
||||
}
|
||||
|
||||
NetworkManager::NetworkManager(QupZilla* mainClass, QObject* parent)
|
||||
NetworkManager::NetworkManager(QObject* parent)
|
||||
: NetworkManagerProxy(parent)
|
||||
, m_adblockManager(0)
|
||||
, p_QupZilla(mainClass)
|
||||
, m_ignoreAllWarnings(false)
|
||||
{
|
||||
connect(this, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), this, SLOT(authentication(QNetworkReply*, QAuthenticator*)));
|
||||
@ -254,7 +253,7 @@ void NetworkManager::sslError(QNetworkReply* reply, QList<QSslError> errors)
|
||||
|
||||
void NetworkManager::authentication(QNetworkReply* reply, QAuthenticator* auth)
|
||||
{
|
||||
QDialog* dialog = new QDialog(p_QupZilla);
|
||||
QDialog* dialog = new QDialog();
|
||||
dialog->setWindowTitle(tr("Authorisation required"));
|
||||
|
||||
QFormLayout* formLa = new QFormLayout(dialog);
|
||||
@ -428,7 +427,7 @@ void NetworkManager::ftpAuthentication(const QUrl &url, QAuthenticator* auth)
|
||||
|
||||
void NetworkManager::proxyAuthentication(const QNetworkProxy &proxy, QAuthenticator* auth)
|
||||
{
|
||||
QDialog* dialog = new QDialog(p_QupZilla);
|
||||
QDialog* dialog = new QDialog();
|
||||
dialog->setWindowTitle(tr("Proxy authorisation required"));
|
||||
|
||||
QFormLayout* formLa = new QFormLayout(dialog);
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "qz_namespace.h"
|
||||
#include "networkmanagerproxy.h"
|
||||
|
||||
class QupZilla;
|
||||
class AdBlockManager;
|
||||
class NetworkProxyFactory;
|
||||
class QupZillaSchemeHandler;
|
||||
@ -34,7 +33,7 @@ class QT_QUPZILLA_EXPORT NetworkManager : public NetworkManagerProxy
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit NetworkManager(QupZilla* mainClass, QObject* parent = 0);
|
||||
explicit NetworkManager(QObject* parent = 0);
|
||||
QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData);
|
||||
|
||||
void loadSettings();
|
||||
@ -69,7 +68,6 @@ private slots:
|
||||
|
||||
private:
|
||||
AdBlockManager* m_adblockManager;
|
||||
QupZilla* p_QupZilla;
|
||||
NetworkProxyFactory* m_proxyFactory;
|
||||
|
||||
QStringList m_certPaths;
|
||||
|
Loading…
Reference in New Issue
Block a user