summaryrefslogtreecommitdiff
path: root/www-client/falkon/files/falkon-3.0.1-qtwebengine-version.patch
blob: 7634c30f6164b9272ade3c5803dbca84328dd642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Combined diffs:

From d06a0d60e0ff3e9e3d5dbaec17b3447fca665b92 Mon Sep 17 00:00:00 2001
From: Kevin Kofler <kevin.kofler@chello.at>
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 <nowrep@gmail.com>
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 <QDebug>
 #include <QFlags>
+#include <QtWebEngineVersion>
 
 #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<QString> webPageTypes = {
             QSL("text/html"),
@@ -507,9 +506,6 @@
             page()->download(url());
         }
     });
-#else
-    triggerPageAction(QWebEnginePage::SavePage);
-#endif
 }
 
 void WebView::copyImageToClipboard()