Combined diffs: From d06a0d60e0ff3e9e3d5dbaec17b3447fca665b92 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 12 May 2018 03:15:56 +0200 Subject: Fix the fix for #391300 to require only QtWebEngine 5.10, not Qt 5.10 QtWebEngine can be newer than the rest of Qt (e.g., on Fedora 27). From 9f0f688ee8ed7d454713db5418c9a86f80fd5850 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 14 May 2018 13:53:05 +0200 Subject: Use QTWEBENGINE_VERSION instead of QT_VERSION Fixes build against separate QtWebEngine releases. * asturm@gentoo.org: Make #ifdef obsolete by requiring Qt 5.11.0. --- b/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ # Mandatory: Qt5 -set(QT_MIN_VERSION "5.9.0") +set(QT_MIN_VERSION "5.11.0") -find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets Network Sql QuickWidgets PrintSupport WebEngineWidgets WebChannel) +find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets Network Sql QuickWidgets PrintSupport WebEngine WebEngineWidgets WebChannel) if (BUILD_TESTING) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test) endif() --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -297,6 +297,9 @@ qt5_add_resources(SRCS add_library(FalkonPrivate SHARED ${SRCS}) +get_property(QT_WEBENGINE_INCLUDE_DIRS TARGET Qt5::WebEngine PROPERTY INTERFACE_INCLUDE_DIRECTORIES) +target_include_directories(FalkonPrivate SYSTEM PUBLIC ${QT_WEBENGINE_INCLUDE_DIRS}) + target_link_libraries(FalkonPrivate Qt5::Widgets Qt5::WebEngineWidgets --- a/src/lib/app/qzcommon.h +++ b/src/lib/app/qzcommon.h @@ -20,6 +20,7 @@ #include #include +#include #ifdef FALKON_SHAREDLIBRARY #define FALKON_EXPORT Q_DECL_EXPORT --- a/src/lib/webengine/webview.cpp 2018-12-09 17:12:29.659899904 +0100 +++ b/src/lib/webengine/webview.cpp 2018-12-09 17:21:26.083044301 +0100 @@ -495,7 +495,6 @@ void WebView::savePageAs() { -#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) page()->runJavaScript(QSL("document.contentType"), WebPage::SafeJsWorld, [this](const QVariant &res) { const QSet webPageTypes = { QSL("text/html"), @@ -507,9 +506,6 @@ page()->download(url()); } }); -#else - triggerPageAction(QWebEnginePage::SavePage); -#endif } void WebView::copyImageToClipboard()