Use QTWEBENGINEWIDGETS_VERSION to decide on Qt WebEngine features
From https://www.freshports.org/deskutils/syncthingtray (tcberner): "When WebEngine and Core are out of sync as they tend to be for us, this leads to compilation errors."
This commit is contained in:
parent
f94db6703b
commit
34b9881ffe
|
@ -10,7 +10,7 @@ set(META_APP_CATEGORIES "Network;FileTransfer")
|
|||
set(META_GUI_OPTIONAL false)
|
||||
set(META_VERSION_MAJOR 0)
|
||||
set(META_VERSION_MINOR 10)
|
||||
set(META_VERSION_PATCH 4)
|
||||
set(META_VERSION_PATCH 5)
|
||||
set(META_VERSION_EXACT_SONAME ON)
|
||||
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <QKeyEvent>
|
||||
#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE)
|
||||
#include <QWebEngineProfile>
|
||||
#include <QtWebEngineWidgetsVersion>
|
||||
#endif
|
||||
|
||||
using namespace QtUtilities;
|
||||
|
@ -28,7 +29,7 @@ WebViewDialog::WebViewDialog(QWidget *parent)
|
|||
|
||||
#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE)
|
||||
m_profile = new QWebEngineProfile(objectName(), this);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
|
||||
#if (QTWEBENGINEWIDGETS_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));
|
||||
|
|
Loading…
Reference in New Issue