1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Fix build with QtWebEngine < 5.11

This commit is contained in:
David Rosca 2019-03-01 16:26:16 +01:00
parent 3f4dd627be
commit bf9b7667f7
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -133,7 +133,9 @@ WebPage::WebPage(QObject* parent)
WebPage::~WebPage()
{
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 11, 0)
delete m_registerProtocolHandlerRequest;
#endif
if (m_runningLoop) {
m_runningLoop->exit(1);
@ -506,17 +508,21 @@ QStringList WebPage::autoFillUsernames() const
QUrl WebPage::registerProtocolHandlerRequestUrl() const
{
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 11, 0)
if (m_registerProtocolHandlerRequest && url().host() == m_registerProtocolHandlerRequest->origin().host()) {
return m_registerProtocolHandlerRequest->origin();
}
#endif
return QUrl();
}
QString WebPage::registerProtocolHandlerRequestScheme() const
{
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 11, 0)
if (m_registerProtocolHandlerRequest && url().host() == m_registerProtocolHandlerRequest->origin().host()) {
return m_registerProtocolHandlerRequest->scheme();
}
#endif
return QString();
}