1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Bump minimum Qt to 5.8

This commit is contained in:
David Rosca 2017-02-06 18:38:32 +01:00
parent 4e9b481809
commit 13cba7a069
8 changed files with 9 additions and 42 deletions

View File

@ -4,7 +4,6 @@ language: cpp
cache: apt cache: apt
env: env:
- QT=qt57
- QT=qt58 - QT=qt58
before_install: before_install:
@ -14,12 +13,10 @@ before_install:
install: install:
- sudo apt-get -qq update - sudo apt-get -qq update
- sudo apt-get -qq install libssl-dev pkg-config libxcb-util0-dev - 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 - 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: script:
- QMAKE="qmake" - QMAKE="qmake"
- if [[ "$QT" == "qt57" ]]; then QMAKE="/opt/qt57/bin/qmake"; fi
- if [[ "$QT" == "qt58" ]]; then QMAKE="/opt/qt58/bin/qmake"; fi - if [[ "$QT" == "qt58" ]]; then QMAKE="/opt/qt58/bin/qmake"; fi
- $QMAKE QMAKE_CXXFLAGS+="-Wextra -Werror" - $QMAKE QMAKE_CXXFLAGS+="-Wextra -Werror"
- make || exit 1 - make || exit 1

View File

@ -16,18 +16,18 @@ General
CONFIG += debug 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 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. libraries. in order to build QupZilla.
Linux / Unix 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 Next compulsory requirement is OpenSSL (libcrypto). xcb libraries are also
required unless you specify NO_X11 build option. 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, 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. [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 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: 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 You need to specify path to macdeployqt (usually in QTDIR/bin/macdeployqt) only
if it is not in PATH. 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 FreeBSD
---------------------------------------------------------------------------------- ----------------------------------------------------------------------------------

View File

@ -6,12 +6,12 @@
# #
#------------------------------------------------- #-------------------------------------------------
lessThan(QT_VERSION, 5.7) { lessThan(QT_VERSION, 5.8) {
error("QupZilla requires at least Qt 5.7!") error("QupZilla requires at least Qt 5.8!")
} }
lessThan(QT.webengine.VERSION, 5.7) { lessThan(QT.webengine.VERSION, 5.8) {
error("QupZilla requires at least QtWebEngine 5.7!") error("QupZilla requires at least QtWebEngine 5.8!")
} }
# Create plugins directory first on Mac / Linux # Create plugins directory first on Mac / Linux

View File

@ -30,7 +30,7 @@ are using QtWebEngine.
Compiling 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. and you have read the [BUILDING.md](https://github.com/QupZilla/qupzilla/blob/master/BUILDING.md) information.
**Linux** **Linux**

View File

@ -920,12 +920,10 @@ void MainApplication::loadSettings()
const int cacheSize = settings.value(QSL("Web-Browser-Settings/LocalCacheSize"), 50).toInt() * 1000 * 1000; const int cacheSize = settings.value(QSL("Web-Browser-Settings/LocalCacheSize"), 50).toInt() * 1000 * 1000;
profile->setHttpCacheMaximumSize(cacheSize); profile->setHttpCacheMaximumSize(cacheSize);
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
settings.beginGroup(QSL("SpellCheck")); settings.beginGroup(QSL("SpellCheck"));
profile->setSpellCheckEnabled(settings.value(QSL("Enabled"), false).toBool()); profile->setSpellCheckEnabled(settings.value(QSL("Enabled"), false).toBool());
profile->setSpellCheckLanguages(settings.value(QSL("Languages")).toStringList()); profile->setSpellCheckLanguages(settings.value(QSL("Languages")).toStringList());
settings.endGroup(); settings.endGroup();
#endif
if (isPrivate()) { if (isPrivate()) {
webSettings->setAttribute(QWebEngineSettings::LocalStorageEnabled, false); webSettings->setAttribute(QWebEngineSettings::LocalStorageEnabled, false);

View File

@ -258,12 +258,8 @@ void DownloadManager::download(QWebEngineDownloadItem *downloadItem)
// Filename may have been percent encoded and actually containing path // Filename may have been percent encoded and actually containing path
fileName = QFileInfo(fileName).fileName(); fileName = QFileInfo(fileName).fileName();
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
const bool forceAsk = downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat const bool forceAsk = downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat
|| downloadItem->type() == QWebEngineDownloadItem::UserRequested; || downloadItem->type() == QWebEngineDownloadItem::UserRequested;
#else
const bool forceAsk = downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat;
#endif
if (m_useExternalManager) { if (m_useExternalManager) {
startExternalManager(downloadItem->url()); startExternalManager(downloadItem->url());
@ -274,11 +270,9 @@ void DownloadManager::download(QWebEngineDownloadItem *downloadItem)
if (downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat) { if (downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat) {
// Save Page requested // Save Page requested
result = SavePage; result = SavePage;
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
} else if (downloadItem->type() == QWebEngineDownloadItem::UserRequested) { } else if (downloadItem->type() == QWebEngineDownloadItem::UserRequested) {
// Save x as... requested // Save x as... requested
result = Save; result = Save;
#endif
} else { } else {
// Ask what to do // Ask what to do
DownloadOptionsDialog optionsDialog(fileName, downloadItem, mApp->activeWindow()); DownloadOptionsDialog optionsDialog(fileName, downloadItem, mApp->activeWindow());

View File

@ -404,7 +404,6 @@ Preferences::Preferences(BrowserWindow* window)
m_notifPosition = settings.value("Position", QPoint(10, 10)).toPoint(); m_notifPosition = settings.value("Position", QPoint(10, 10)).toPoint();
settings.endGroup(); settings.endGroup();
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
//SPELLCHECK //SPELLCHECK
settings.beginGroup(QSL("SpellCheck")); settings.beginGroup(QSL("SpellCheck"));
ui->spellcheckEnabled->setChecked(settings.value(QSL("Enabled"), false).toBool()); ui->spellcheckEnabled->setChecked(settings.value(QSL("Enabled"), false).toBool());
@ -444,10 +443,6 @@ Preferences::Preferences(BrowserWindow* window)
} else { } else {
ui->spellcheckNoLanguages->hide(); ui->spellcheckNoLanguages->hide();
} }
#else
delete ui->listWidget->item(11);
delete ui->stackedWidget->widget(11);
#endif
//OTHER //OTHER
//Languages //Languages

View File

@ -516,14 +516,7 @@ void WebView::showSource()
return; return;
} }
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
triggerPageAction(QWebEnginePage::ViewSource); triggerPageAction(QWebEnginePage::ViewSource);
#else
QUrl u;
u.setScheme(QSL("view-source"));
u.setPath(url().toString());
openUrlInNewTab(u, Qz::NT_SelectedTab);
#endif
} }
void WebView::showSiteInfo() void WebView::showSiteInfo()
@ -645,7 +638,6 @@ void WebView::createContextMenu(QMenu *menu, WebHitTestResult &hitTest)
const QWebEngineContextMenuData &contextMenuData = page()->contextMenuData(); const QWebEngineContextMenuData &contextMenuData = page()->contextMenuData();
hitTest.updateWithContextMenuData(contextMenuData); hitTest.updateWithContextMenuData(contextMenuData);
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
if (!contextMenuData.misspelledWord().isEmpty()) { if (!contextMenuData.misspelledWord().isEmpty()) {
QFont boldFont = menu->font(); QFont boldFont = menu->font();
boldFont.setBold(true); boldFont.setBold(true);
@ -666,7 +658,6 @@ void WebView::createContextMenu(QMenu *menu, WebHitTestResult &hitTest)
menu->addSeparator(); menu->addSeparator();
spellCheckActionCount = menu->actions().count(); spellCheckActionCount = menu->actions().count();
} }
#endif
if (!hitTest.linkUrl().isEmpty() && hitTest.linkUrl().scheme() != QL1S("javascript")) { if (!hitTest.linkUrl().isEmpty() && hitTest.linkUrl().scheme() != QL1S("javascript")) {
createLinkContextMenu(menu, hitTest); createLinkContextMenu(menu, hitTest);