mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-21 09:42:10 +02:00
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). This fixes the version check in WebView::savePageAs to use a macro defined in config.h.cmake based on the version of QtWebEngineWidgets rather than relying on QT_VERSION, which is the version of QtCore. Reviewed By: drosca Differential Revision: https://phabricator.kde.org/D12833 CCBUG: 391300
This commit is contained in:
parent
4bf77cd4d1
commit
d06a0d60e0
|
@ -85,6 +85,8 @@ if (WIN32)
|
||||||
add_definitions(-D_WIN32_WINNT=${ver})
|
add_definitions(-D_WIN32_WINNT=${ver})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(HAVE_QTWEBENGINE_5_10 NOT Qt5WebEngineWidgets_VERSION VERSION_LESS 5.10.0)
|
||||||
|
|
||||||
# Mandatory: OpenSSL
|
# Mandatory: OpenSSL
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
|
||||||
|
|
|
@ -9,3 +9,6 @@
|
||||||
|
|
||||||
/* Disable DBus support */
|
/* Disable DBus support */
|
||||||
#cmakedefine DISABLE_DBUS
|
#cmakedefine DISABLE_DBUS
|
||||||
|
|
||||||
|
/* QtWebEngine is at least version 5.10 */
|
||||||
|
#cmakedefine01 HAVE_QTWEBENGINE_5_10
|
||||||
|
|
|
@ -495,7 +495,7 @@ void WebView::copyLinkToClipboard()
|
||||||
|
|
||||||
void WebView::savePageAs()
|
void WebView::savePageAs()
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
#if HAVE_QTWEBENGINE_5_10
|
||||||
page()->runJavaScript(QSL("document.contentType"), WebPage::SafeJsWorld, [this](const QVariant &res) {
|
page()->runJavaScript(QSL("document.contentType"), WebPage::SafeJsWorld, [this](const QVariant &res) {
|
||||||
const QSet<QString> webPageTypes = {
|
const QSet<QString> webPageTypes = {
|
||||||
QSL("text/html"),
|
QSL("text/html"),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user