From 13cba7a069f208dd1b03b3426911a40f882d7bf2 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 6 Feb 2017 18:38:32 +0100 Subject: [PATCH] Bump minimum Qt to 5.8 --- .travis.yml | 3 --- BUILDING.md | 16 ++++------------ QupZilla.pro | 8 ++++---- README.md | 2 +- src/lib/app/mainapplication.cpp | 2 -- src/lib/downloads/downloadmanager.cpp | 6 ------ src/lib/preferences/preferences.cpp | 5 ----- src/lib/webengine/webview.cpp | 9 --------- 8 files changed, 9 insertions(+), 42 deletions(-) diff --git a/.travis.yml b/.travis.yml index 478a315f3..29964ba91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ language: cpp cache: apt env: - - QT=qt57 - QT=qt58 before_install: @@ -14,12 +13,10 @@ before_install: install: - sudo apt-get -qq update - sudo apt-get -qq install libssl-dev pkg-config libxcb-util0-dev - - if [[ "$QT" == "qt57" ]]; then sudo apt-add-repository -y ppa:beineri/opt-qt571-trusty; sudo apt-get update -qq; sudo apt-get install -qq qt57tools qt57script qt57webengine qt57webchannel qt57declarative qt57x11extras; fi - if [[ "$QT" == "qt58" ]]; then sudo apt-add-repository -y ppa:beineri/opt-qt58-trusty; sudo apt-get update -qq; sudo apt-get install -qq qt58tools qt58script qt58webengine qt58webchannel qt58declarative qt58x11extras; fi script: - QMAKE="qmake" - - if [[ "$QT" == "qt57" ]]; then QMAKE="/opt/qt57/bin/qmake"; fi - if [[ "$QT" == "qt58" ]]; then QMAKE="/opt/qt58/bin/qmake"; fi - $QMAKE QMAKE_CXXFLAGS+="-Wextra -Werror" - make || exit 1 diff --git a/BUILDING.md b/BUILDING.md index 2b66a66b4..891e19517 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -16,18 +16,18 @@ General CONFIG += debug - QupZilla requires Qt (>= 5.7) and QtWebEngine (at least version included in Qt 5.7) + QupZilla requires Qt (>= 5.8) and QtWebEngine (at least version included in Qt 5.8) Microsoft Windows ---------------------------------------------------------------------------------- - You need Microsoft Visual C++ Compiler, Qt Libraries 5.7.0 or higher and openssl + You need Microsoft Visual C++ Compiler, Qt Libraries 5.8 or higher and openssl libraries. in order to build QupZilla. Linux / Unix ---------------------------------------------------------------------------------- - You need to have Qt 5 (>= 5.7) with QtWebEngine. + You need to have Qt 5 (>= 5.8) with QtWebEngine. Next compulsory requirement is OpenSSL (libcrypto). xcb libraries are also required unless you specify NO_X11 build option. @@ -46,7 +46,7 @@ MAC OS X You need to have Xcode from the Apple App Store installed in Applications, [Command Line Tools for the same Xcode version](https://developer.apple.com/) may be included depending on the version, [Homebrew](http://brew.sh/), and `$ brew install openssl` for openssl. - Next compulsory requirement is Qt 5 (>= 5.7) with QtWebEngine. + Next compulsory requirement is Qt 5 (>= 5.8) with QtWebEngine. After successful compilation, you need to build the application bundle and follow any instructions that may be presented. You will do it with following command: @@ -55,14 +55,6 @@ MAC OS X You need to specify path to macdeployqt (usually in QTDIR/bin/macdeployqt) only if it is not in PATH. -OS/2 ----------------------------------------------------------------------------------- - - I cannot provide support for QupZilla on OS/2 as I don't have access to - machine with OS/2, but it is possible to get QupZilla working there. - - Builds are provided by netlabs.org (http://svn.netlabs.org/qtapps/wiki/QT4%20Networking) - FreeBSD ---------------------------------------------------------------------------------- diff --git a/QupZilla.pro b/QupZilla.pro index 85fb838e0..7ba2464ad 100644 --- a/QupZilla.pro +++ b/QupZilla.pro @@ -6,12 +6,12 @@ # #------------------------------------------------- -lessThan(QT_VERSION, 5.7) { - error("QupZilla requires at least Qt 5.7!") +lessThan(QT_VERSION, 5.8) { + error("QupZilla requires at least Qt 5.8!") } -lessThan(QT.webengine.VERSION, 5.7) { - error("QupZilla requires at least QtWebEngine 5.7!") +lessThan(QT.webengine.VERSION, 5.8) { + error("QupZilla requires at least QtWebEngine 5.8!") } # Create plugins directory first on Mac / Linux diff --git a/README.md b/README.md index 231a35c04..9d0794d74 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ are using QtWebEngine. Compiling ---------------------------------------------------------------------------------------- -Before you start compiling, make sure that you have installed the Qt (>= 5.7) development libraries +Before you start compiling, make sure that you have installed the Qt (>= 5.8) development libraries and you have read the [BUILDING.md](https://github.com/QupZilla/qupzilla/blob/master/BUILDING.md) information. **Linux** diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 754d4f71e..90155b00b 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -920,12 +920,10 @@ void MainApplication::loadSettings() const int cacheSize = settings.value(QSL("Web-Browser-Settings/LocalCacheSize"), 50).toInt() * 1000 * 1000; profile->setHttpCacheMaximumSize(cacheSize); -#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) settings.beginGroup(QSL("SpellCheck")); profile->setSpellCheckEnabled(settings.value(QSL("Enabled"), false).toBool()); profile->setSpellCheckLanguages(settings.value(QSL("Languages")).toStringList()); settings.endGroup(); -#endif if (isPrivate()) { webSettings->setAttribute(QWebEngineSettings::LocalStorageEnabled, false); diff --git a/src/lib/downloads/downloadmanager.cpp b/src/lib/downloads/downloadmanager.cpp index eb9894b36..d397ef22c 100644 --- a/src/lib/downloads/downloadmanager.cpp +++ b/src/lib/downloads/downloadmanager.cpp @@ -258,12 +258,8 @@ void DownloadManager::download(QWebEngineDownloadItem *downloadItem) // Filename may have been percent encoded and actually containing path fileName = QFileInfo(fileName).fileName(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) const bool forceAsk = downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat || downloadItem->type() == QWebEngineDownloadItem::UserRequested; -#else - const bool forceAsk = downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat; -#endif if (m_useExternalManager) { startExternalManager(downloadItem->url()); @@ -274,11 +270,9 @@ void DownloadManager::download(QWebEngineDownloadItem *downloadItem) if (downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat) { // Save Page requested result = SavePage; -#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) } else if (downloadItem->type() == QWebEngineDownloadItem::UserRequested) { // Save x as... requested result = Save; -#endif } else { // Ask what to do DownloadOptionsDialog optionsDialog(fileName, downloadItem, mApp->activeWindow()); diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index cee21c605..e19f9a945 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -404,7 +404,6 @@ Preferences::Preferences(BrowserWindow* window) m_notifPosition = settings.value("Position", QPoint(10, 10)).toPoint(); settings.endGroup(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) //SPELLCHECK settings.beginGroup(QSL("SpellCheck")); ui->spellcheckEnabled->setChecked(settings.value(QSL("Enabled"), false).toBool()); @@ -444,10 +443,6 @@ Preferences::Preferences(BrowserWindow* window) } else { ui->spellcheckNoLanguages->hide(); } -#else - delete ui->listWidget->item(11); - delete ui->stackedWidget->widget(11); -#endif //OTHER //Languages diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp index 8ece42e74..b9472ef35 100644 --- a/src/lib/webengine/webview.cpp +++ b/src/lib/webengine/webview.cpp @@ -516,14 +516,7 @@ void WebView::showSource() return; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) triggerPageAction(QWebEnginePage::ViewSource); -#else - QUrl u; - u.setScheme(QSL("view-source")); - u.setPath(url().toString()); - openUrlInNewTab(u, Qz::NT_SelectedTab); -#endif } void WebView::showSiteInfo() @@ -645,7 +638,6 @@ void WebView::createContextMenu(QMenu *menu, WebHitTestResult &hitTest) const QWebEngineContextMenuData &contextMenuData = page()->contextMenuData(); hitTest.updateWithContextMenuData(contextMenuData); -#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) if (!contextMenuData.misspelledWord().isEmpty()) { QFont boldFont = menu->font(); boldFont.setBold(true); @@ -666,7 +658,6 @@ void WebView::createContextMenu(QMenu *menu, WebHitTestResult &hitTest) menu->addSeparator(); spellCheckActionCount = menu->actions().count(); } -#endif if (!hitTest.linkUrl().isEmpty() && hitTest.linkUrl().scheme() != QL1S("javascript")) { createLinkContextMenu(menu, hitTest);