summaryrefslogtreecommitdiffstats
path: root/src/core/profile_adapter.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-04-16 15:41:42 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-04-20 09:45:00 +0200
commit9e56f570e31a0ef18e544bb21dfddebfe43ec2d0 (patch)
tree5f3af76e8120aada7bc472ece9c7f25da149c9d4 /src/core/profile_adapter.cpp
parenta05bb73747620dd8f0294a57ff690a4f4202884e (diff)
Cleanup interceptors in profile
Change-Id: Ibc6d63845601b8189ac38bacc77885327284c81f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/profile_adapter.cpp')
-rw-r--r--src/core/profile_adapter.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp
index c27883b65..d2c4ab1d8 100644
--- a/src/core/profile_adapter.cpp
+++ b/src/core/profile_adapter.cpp
@@ -95,7 +95,6 @@ ProfileAdapter::ProfileAdapter(const QString &storageName):
, m_persistentCookiesPolicy(AllowPersistentCookies)
, m_visitedLinksPolicy(TrackVisitedLinksOnDisk)
, m_httpCacheMaxSize(0)
- , m_pageRequestInterceptors(0)
{
WebEngineContext::current()->addProfileAdapter(this);
// creation of profile requires webengine context
@@ -134,7 +133,6 @@ ProfileAdapter::~ProfileAdapter()
#if QT_CONFIG(ssl)
delete m_clientCertificateStore;
#endif
- Q_ASSERT(m_pageRequestInterceptors == 0);
}
void ProfileAdapter::setStorageName(const QString &storageName)
@@ -194,19 +192,7 @@ QWebEngineUrlRequestInterceptor *ProfileAdapter::requestInterceptor()
void ProfileAdapter::setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor)
{
- if (m_requestInterceptor == interceptor)
- return;
-
- if (m_requestInterceptor)
- disconnect(m_requestInterceptor, &QObject::destroyed, this, nullptr);
m_requestInterceptor = interceptor;
- if (m_requestInterceptor)
- connect(m_requestInterceptor, &QObject::destroyed, this, [this] () {
- m_profile->m_profileIOData->updateRequestInterceptor();
- Q_ASSERT(!m_profile->m_profileIOData->requestInterceptor());
- });
-
- m_profile->m_profileIOData->updateRequestInterceptor();
}
void ProfileAdapter::addClient(ProfileAdapterClient *adapterClient)
@@ -219,20 +205,6 @@ void ProfileAdapter::removeClient(ProfileAdapterClient *adapterClient)
m_clients.removeOne(adapterClient);
}
-void ProfileAdapter::addPageRequestInterceptor()
-{
- ++m_pageRequestInterceptors;
- m_profile->m_profileIOData->updateRequestInterceptor();
-}
-
-void ProfileAdapter::removePageRequestInterceptor()
-{
- Q_ASSERT(m_pageRequestInterceptors > 0);
- --m_pageRequestInterceptors;
- m_profile->m_profileIOData->updateRequestInterceptor();
-}
-
-
void ProfileAdapter::cancelDownload(quint32 downloadId)
{
downloadManagerDelegate()->cancelDownload(downloadId);