diff options
-rw-r--r-- | lib/adblock/adblock.qbs | 2 | ||||
-rw-r--r-- | lib/settings/settings.qbs | 1 | ||||
-rw-r--r-- | smolbote.qbs | 4 | ||||
-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 |
9 files changed, 8 insertions, 12 deletions
diff --git a/lib/adblock/adblock.qbs b/lib/adblock/adblock.qbs index 7a59462..e4df779 100644 --- a/lib/adblock/adblock.qbs +++ b/lib/adblock/adblock.qbs @@ -9,7 +9,6 @@ Project { Depends { name: "cpp" } Depends { name: "Qt" - versionAtLeast: "5.9.0" submodules: ["core"] } @@ -24,7 +23,6 @@ Project { Depends { name: "Qt" - versionAtLeast: "5.9.0" submodules: ["core", "test"] } diff --git a/lib/settings/settings.qbs b/lib/settings/settings.qbs index aeb502d..0559daa 100644 --- a/lib/settings/settings.qbs +++ b/lib/settings/settings.qbs @@ -24,7 +24,6 @@ Project { Depends { name: "Qt" - versionAtLeast: "5.9.0" submodules: ["core", "widgets"] } diff --git a/smolbote.qbs b/smolbote.qbs index 92f159f..7f0af2e 100644 --- a/smolbote.qbs +++ b/smolbote.qbs @@ -49,8 +49,8 @@ Project { Depends { name: "Qt" - versionAtLeast: "5.9.0" - submodules: ["core", "widgets", "webengine", "webenginewidgets"] + versionAtLeast: "5.7.1" + submodules: ["core", "widgets", "webengine", "webenginewidgets", "printsupport"] } Depends { name: "navigation" } 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]() { |