mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +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_plugins->shutdown();
|
||||
m_networkManager->shutdown();
|
||||
|
||||
DataPaths::clearTempData();
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
||||
* QupZilla - Qt web browser
|
||||
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* 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;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
||||
* QupZilla - Qt web browser
|
||||
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* 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;
|
||||
|
Loading…
Reference in New Issue
Block a user