1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Use new setUrlRequestInterceptor() method

removes deprecation warning during compilation 
when building against Qt 5.13 or later
This commit is contained in:
Mikalai Ahnioŭ 2020-05-25 12:25:04 +00:00
parent 5d0c9bb238
commit 742b20154b

View File

@ -59,7 +59,11 @@ NetworkManager::NetworkManager(QObject *parent)
// Create url interceptor // Create url interceptor
m_urlInterceptor = new NetworkUrlInterceptor(this); m_urlInterceptor = new NetworkUrlInterceptor(this);
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 13, 0)
mApp->webProfile()->setUrlRequestInterceptor(m_urlInterceptor);
#else
mApp->webProfile()->setRequestInterceptor(m_urlInterceptor); mApp->webProfile()->setRequestInterceptor(m_urlInterceptor);
#endif
// Create cookie jar // Create cookie jar
mApp->cookieJar(); mApp->cookieJar();
@ -295,7 +299,11 @@ void NetworkManager::loadSettings()
void NetworkManager::shutdown() void NetworkManager::shutdown()
{ {
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 13, 0)
mApp->webProfile()->setUrlRequestInterceptor(nullptr);
#else
mApp->webProfile()->setRequestInterceptor(nullptr); mApp->webProfile()->setRequestInterceptor(nullptr);
#endif
} }
// static // static