mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01: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})
|
||||
endif()
|
||||
|
||||
set(HAVE_QTWEBENGINE_5_10 NOT Qt5WebEngineWidgets_VERSION VERSION_LESS 5.10.0)
|
||||
|
||||
# Mandatory: OpenSSL
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
|
@ -9,3 +9,6 @@
|
||||
|
||||
/* Disable DBus support */
|
||||
#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()
|
||||
{
|
||||
#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) {
|
||||
const QSet<QString> webPageTypes = {
|
||||
QSL("text/html"),
|
||||
|
Loading…
Reference in New Issue
Block a user