diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-12-23 02:04:26 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-12-23 02:04:26 +0100 |
commit | e4c0b4832b715f3c312ef15716c31a9879930553 (patch) | |
tree | 5b54a79068f53ea3cd2f6c0ab17206c70911ba50 /src | |
parent | Single instance check works again (diff) | |
download | smolbote-e4c0b4832b715f3c312ef15716c31a9879930553.tar.xz |
smolbote can now compile on Qt 5.7.1
Diffstat (limited to 'src')
-rw-r--r-- | src/browser.cpp | 2 | ||||
-rw-r--r-- | src/lib/bookmarks/bookmarks.qbs | 1 | ||||
-rw-r--r-- | src/lib/downloads/downloads.qbs | 1 | ||||
-rw-r--r-- | src/lib/navigation/navigation.qbs | 1 | ||||
-rw-r--r-- | src/webengine/webengineprofile.cpp | 6 | ||||
-rw-r--r-- | src/webengine/webview.cpp | 2 |
6 files changed, 6 insertions, 7 deletions
diff --git a/src/browser.cpp b/src/browser.cpp index 7d39035..25ff5fb 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -14,6 +14,8 @@ #include <QtWebEngine> #include <QDir> +#include <QWebEngineDownloadItem> + Browser::Browser(int &argc, char *argv[]) : SingleApplication(argc, argv) { diff --git a/src/lib/bookmarks/bookmarks.qbs b/src/lib/bookmarks/bookmarks.qbs index 22971a4..211b017 100644 --- a/src/lib/bookmarks/bookmarks.qbs +++ b/src/lib/bookmarks/bookmarks.qbs @@ -11,7 +11,6 @@ Project { Depends { name: "Qt" - versionAtLeast: "5.9.0" submodules: ["core", "widgets"] } diff --git a/src/lib/downloads/downloads.qbs b/src/lib/downloads/downloads.qbs index 121b425..3fce0f9 100644 --- a/src/lib/downloads/downloads.qbs +++ b/src/lib/downloads/downloads.qbs @@ -11,7 +11,6 @@ Project { Depends { name: "Qt" - versionAtLeast: "5.9.0" submodules: ["core", "widgets", "webenginewidgets"] } diff --git a/src/lib/navigation/navigation.qbs b/src/lib/navigation/navigation.qbs index d070b7f..a58f86d 100644 --- a/src/lib/navigation/navigation.qbs +++ b/src/lib/navigation/navigation.qbs @@ -11,7 +11,6 @@ Project { Depends { name: "Qt" - versionAtLeast: "5.9.0" submodules: ["core", "widgets", "webengine", "webenginewidgets"] } diff --git a/src/webengine/webengineprofile.cpp b/src/webengine/webengineprofile.cpp index ff92803..cee23da 100644 --- a/src/webengine/webengineprofile.cpp +++ b/src/webengine/webengineprofile.cpp @@ -92,9 +92,11 @@ WebEngineProfile::WebEngineProfile(const QString &name, const QString &path, QOb settings()->setAttribute(QWebEngineSettings::Accelerated2dCanvasEnabled, config.value("accelerated2dCanvasEnabled", true).toBool()); settings()->setAttribute(QWebEngineSettings::AutoLoadIconsForPage, config.value("autoLoadIconsForPage", true).toBool()); settings()->setAttribute(QWebEngineSettings::TouchIconsEnabled, config.value("touchIconsEnabled", false).toBool()); +#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, config.value("focusOnNavigationEnabled", true).toBool()); settings()->setAttribute(QWebEngineSettings::PrintElementBackgrounds, config.value("printElementBackgrounds", true).toBool()); settings()->setAttribute(QWebEngineSettings::AllowRunningInsecureContent, config.value("allowRunningInsecureContent", false).toBool()); +#endif config.endGroup(); // attributes @@ -185,17 +187,13 @@ void WebEngineProfile::saveProfile() config.setValue("hyperlinkAuditingEnabled", s->testAttribute(QWebEngineSettings::HyperlinkAuditingEnabled)); config.setValue("scrollAnimatorEnabled", s->testAttribute(QWebEngineSettings::ScrollAnimatorEnabled)); config.setValue("errorPageEnabled", s->testAttribute(QWebEngineSettings::ErrorPageEnabled)); -#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) config.setValue("pluginsEnabled", s->testAttribute(QWebEngineSettings::PluginsEnabled)); config.setValue("fullscreenSupportEnabled", s->testAttribute(QWebEngineSettings::FullScreenSupportEnabled)); -#endif -#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) config.setValue("screenCaptureEnabled", s->testAttribute(QWebEngineSettings::ScreenCaptureEnabled)); config.setValue("webglEnabled", s->testAttribute(QWebEngineSettings::WebGLEnabled)); config.setValue("accelerated2dCanvasEnabled", s->testAttribute(QWebEngineSettings::Accelerated2dCanvasEnabled)); config.setValue("autoLoadIconsForPage", s->testAttribute(QWebEngineSettings::AutoLoadIconsForPage)); config.setValue("touchIconsEnabled", s->testAttribute(QWebEngineSettings::TouchIconsEnabled)); -#endif #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) config.setValue("focusOnNavigationEnabled", s->testAttribute(QWebEngineSettings::FocusOnNavigationEnabled)); config.setValue("printElementBackgrounds", s->testAttribute(QWebEngineSettings::PrintElementBackgrounds)); diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index 55efad7..a4bff5e 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -96,6 +96,7 @@ WebView::WebView(MainWindow *parentMainWindow, QWidget *parent) : this->triggerPageAction(QWebEnginePage::SavePage); }); +#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) QAction *printAction = m_pageMenu->addAction(tr("Print page")); connect(printAction, &QAction::triggered, [this]() { QPrinter *printer = new QPrinter(QPrinterInfo::defaultPrinter()); @@ -108,6 +109,7 @@ WebView::WebView(MainWindow *parentMainWindow, QWidget *parent) : } delete dlg; }); +#endif QAction *printPdfAction = m_pageMenu->addAction(tr("Print to PDF")); connect(printPdfAction, &QAction::triggered, [this]() { |