mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Save ignored ssl hosts on yes (SSLErrorDialog) and NetworkManager::shutdown()
This commit is contained in:
parent
34e7eb1713
commit
70b8544f9b
|
@ -96,6 +96,7 @@ bool NetworkManager::certificateError(const QWebEngineCertificateError &error, Q
|
|||
switch (dialog.result()) {
|
||||
case SslErrorDialog::Yes:
|
||||
m_ignoredSslHosts.append(host);
|
||||
saveIgnoredSslHosts();
|
||||
return true;
|
||||
|
||||
case SslErrorDialog::OnlyForThisSession:
|
||||
|
@ -298,14 +299,18 @@ void NetworkManager::loadSettings()
|
|||
settings.endGroup();
|
||||
}
|
||||
|
||||
void NetworkManager::shutdown()
|
||||
void NetworkManager::saveIgnoredSslHosts()
|
||||
{
|
||||
Settings settings;
|
||||
settings.beginGroup("Web-Browser-Settings");
|
||||
settings.setValue("IgnoredSslHosts", m_ignoredSslHosts);
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
void NetworkManager::shutdown()
|
||||
{
|
||||
mApp->webProfile()->setUrlRequestInterceptor(nullptr);
|
||||
saveIgnoredSslHosts();
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
@ -54,6 +54,8 @@ protected:
|
|||
QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) override;
|
||||
|
||||
private:
|
||||
void saveIgnoredSslHosts();
|
||||
|
||||
NetworkUrlInterceptor *m_urlInterceptor;
|
||||
ExtensionSchemeManager *m_extensionScheme;
|
||||
QHash<QString, QWebEngineCertificateError::Error> m_ignoredSslErrors;
|
||||
|
|
Loading…
Reference in New Issue
Block a user