Use setUrlRequestInterceptor only with Qt >= 5.13

This commit is contained in:
Martchus 2019-07-08 14:03:54 +02:00
parent 952c023671
commit 7f307822df
1 changed files with 4 additions and 0 deletions

View File

@ -28,7 +28,11 @@ WebViewDialog::WebViewDialog(QWidget *parent)
#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE)
m_profile = new QWebEngineProfile(objectName(), this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
m_profile->setUrlRequestInterceptor(new WebViewInterceptor(m_connectionSettings, m_profile));
#else
m_profile->setRequestInterceptor(new WebViewInterceptor(m_connectionSettings, m_profile));
#endif
m_view->setPage(new WebPage(m_profile, this, m_view));
#else
m_view->setPage(new WebPage(this, m_view));