mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
NetworkManager: Remove NetworkUrlInterceptor in shutdown
Fixes potential crash on close
This commit is contained in:
parent
650bc03241
commit
f7005f8d95
@ -748,6 +748,7 @@ void MainApplication::saveSettings()
|
|||||||
|
|
||||||
m_searchEnginesManager->saveSettings();
|
m_searchEnginesManager->saveSettings();
|
||||||
m_plugins->shutdown();
|
m_plugins->shutdown();
|
||||||
|
m_networkManager->shutdown();
|
||||||
|
|
||||||
DataPaths::clearTempData();
|
DataPaths::clearTempData();
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - Qt web browser
|
||||||
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -249,6 +249,11 @@ void NetworkManager::loadSettings()
|
|||||||
m_urlInterceptor->loadSettings();
|
m_urlInterceptor->loadSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NetworkManager::shutdown()
|
||||||
|
{
|
||||||
|
mApp->webProfile()->setRequestInterceptor(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
QNetworkReply *NetworkManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
|
QNetworkReply *NetworkManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
|
||||||
{
|
{
|
||||||
QNetworkRequest req = request;
|
QNetworkRequest req = request;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - Qt web browser
|
||||||
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -41,6 +41,7 @@ public:
|
|||||||
void removeUrlInterceptor(UrlInterceptor *interceptor);
|
void removeUrlInterceptor(UrlInterceptor *interceptor);
|
||||||
|
|
||||||
void loadSettings();
|
void loadSettings();
|
||||||
|
void shutdown();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) Q_DECL_OVERRIDE;
|
QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) Q_DECL_OVERRIDE;
|
||||||
|
Loading…
Reference in New Issue
Block a user