From 7f307822dfefdbcf39180e10c6a12508adda23b4 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 8 Jul 2019 14:03:54 +0200 Subject: [PATCH] Use setUrlRequestInterceptor only with Qt >= 5.13 --- widgets/webview/webviewdialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widgets/webview/webviewdialog.cpp b/widgets/webview/webviewdialog.cpp index 118b432..2c66dd1 100644 --- a/widgets/webview/webviewdialog.cpp +++ b/widgets/webview/webviewdialog.cpp @@ -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));