1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Revert "Change minimum Qt version to 5.10"

This reverts commit 19cce0c838.
This commit is contained in:
David Rosca 2018-12-25 11:21:06 +01:00
parent 5fd9cb92ee
commit 38ea9974b4
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
4 changed files with 12 additions and 1 deletions

View File

@ -44,7 +44,7 @@ endif()
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_TO_ASCII) add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_TO_ASCII)
# Mandatory: Qt5 # Mandatory: Qt5
set(QT_MIN_VERSION "5.10.0") set(QT_MIN_VERSION "5.9.0")
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets Network Sql QuickWidgets PrintSupport WebEngine 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)

View File

@ -929,7 +929,10 @@ void MainApplication::loadSettings()
webSettings->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true); webSettings->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true);
webSettings->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true); webSettings->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true);
webSettings->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, false); webSettings->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, false);
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 10, 0)
webSettings->setAttribute(QWebEngineSettings::AllowWindowActivationFromJavaScript, settings.value(QSL("allowJavaScriptActivateWindow"), false).toBool()); webSettings->setAttribute(QWebEngineSettings::AllowWindowActivationFromJavaScript, settings.value(QSL("allowJavaScriptActivateWindow"), false).toBool());
#endif
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 11, 0) #if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 11, 0)
webSettings->setAttribute(QWebEngineSettings::JavascriptCanPaste, settings.value(QSL("allowJavaScriptPaste"), true).toBool()); webSettings->setAttribute(QWebEngineSettings::JavascriptCanPaste, settings.value(QSL("allowJavaScriptPaste"), true).toBool());

View File

@ -30,6 +30,10 @@ JsOptions::JsOptions(QWidget* parent)
ui->setupUi(this); ui->setupUi(this);
#if QTWEBENGINEWIDGETS_VERSION < QT_VERSION_CHECK(5, 10, 0)
ui->jscanActivateWindow->setVisible(false);
#endif
#if QTWEBENGINEWIDGETS_VERSION < QT_VERSION_CHECK(5, 11, 0) #if QTWEBENGINEWIDGETS_VERSION < QT_VERSION_CHECK(5, 11, 0)
ui->jscanPaste->setVisible(false); ui->jscanPaste->setVisible(false);
#endif #endif

View File

@ -496,6 +496,7 @@ void WebView::copyLinkToClipboard()
void WebView::savePageAs() void WebView::savePageAs()
{ {
#if QTWEBENGINEWIDGETS_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"),
@ -507,6 +508,9 @@ void WebView::savePageAs()
page()->download(url()); page()->download(url());
} }
}); });
#else
triggerPageAction(QWebEnginePage::SavePage);
#endif
} }
void WebView::copyImageToClipboard() void WebView::copyImageToClipboard()