1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +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
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

View File

@ -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
----------------------------------------------------------------------------------

View File

@ -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

View File

@ -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**

View File

@ -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);

View File

@ -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());

View File

@ -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

View File

@ -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);