mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Use QTWEBENGINE_VERSION instead of QT_VERSION
Fixes build against separate QtWebEngine releases.
This commit is contained in:
parent
29fbbf5dc4
commit
9f0f688ee8
@ -45,7 +45,7 @@ add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER -DQT_NO_CAS
|
|||||||
|
|
||||||
# Mandatory: Qt5
|
# Mandatory: Qt5
|
||||||
set(QT_MIN_VERSION "5.9.0")
|
set(QT_MIN_VERSION "5.9.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)
|
if (BUILD_TESTING)
|
||||||
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test)
|
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test)
|
||||||
endif()
|
endif()
|
||||||
@ -85,8 +85,6 @@ 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,6 +9,3 @@
|
|||||||
|
|
||||||
/* Disable DBus support */
|
/* Disable DBus support */
|
||||||
#cmakedefine DISABLE_DBUS
|
#cmakedefine DISABLE_DBUS
|
||||||
|
|
||||||
/* QtWebEngine is at least version 5.10 */
|
|
||||||
#cmakedefine01 HAVE_QTWEBENGINE_5_10
|
|
||||||
|
@ -297,6 +297,9 @@ qt5_add_resources(SRCS
|
|||||||
|
|
||||||
add_library(FalkonPrivate SHARED ${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
|
target_link_libraries(FalkonPrivate
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
Qt5::WebEngineWidgets
|
Qt5::WebEngineWidgets
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFlags>
|
#include <QFlags>
|
||||||
|
#include <QtWebEngineVersion>
|
||||||
|
|
||||||
#ifdef FALKON_SHAREDLIBRARY
|
#ifdef FALKON_SHAREDLIBRARY
|
||||||
#define FALKON_EXPORT Q_DECL_EXPORT
|
#define FALKON_EXPORT Q_DECL_EXPORT
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#include "scripts.h"
|
#include "scripts.h"
|
||||||
#include "webhittestresult.h"
|
#include "webhittestresult.h"
|
||||||
#include "webscrollbarmanager.h"
|
#include "webscrollbarmanager.h"
|
||||||
#include "../config.h"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -496,7 +495,7 @@ void WebView::copyLinkToClipboard()
|
|||||||
|
|
||||||
void WebView::savePageAs()
|
void WebView::savePageAs()
|
||||||
{
|
{
|
||||||
#if HAVE_QTWEBENGINE_5_10
|
#if QTWEBENGINE_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||||
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