mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Use new setUrlRequestInterceptor() method
removes deprecation warning during compilation when building against Qt 5.13 or later
This commit is contained in:
parent
5d0c9bb238
commit
742b20154b
|
@ -59,7 +59,11 @@ NetworkManager::NetworkManager(QObject *parent)
|
|||
|
||||
// Create url interceptor
|
||||
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);
|
||||
#endif
|
||||
|
||||
// Create cookie jar
|
||||
mApp->cookieJar();
|
||||
|
@ -295,7 +299,11 @@ void NetworkManager::loadSettings()
|
|||
|
||||
void NetworkManager::shutdown()
|
||||
{
|
||||
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 13, 0)
|
||||
mApp->webProfile()->setUrlRequestInterceptor(nullptr);
|
||||
#else
|
||||
mApp->webProfile()->setRequestInterceptor(nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
Loading…
Reference in New Issue
Block a user