From 087c98343ee555f45f2bcf4c75609f504569695c Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sun, 14 Jan 2018 09:22:01 +0100 Subject: [PATCH] Remove compatibility code with Qt older than 5.9 --- src/lib/webengine/loadrequest.cpp | 4 +--- src/lib/webengine/loadrequest.h | 7 +------ src/lib/webengine/webview.cpp | 7 ------- src/plugins/KWalletPasswords/kwalletpasswordbackend.cpp | 4 ---- src/plugins/KWalletPasswords/kwalletplugin.cpp | 6 +----- src/plugins/KWalletPasswords/kwalletplugin.h | 5 +---- 6 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/lib/webengine/loadrequest.cpp b/src/lib/webengine/loadrequest.cpp index 55c07d180..90f58ce8a 100644 --- a/src/lib/webengine/loadrequest.cpp +++ b/src/lib/webengine/loadrequest.cpp @@ -1,6 +1,6 @@ /* ============================================================ * Falkon - Qt web browser -* Copyright (C) 2014-2017 David Rosca +* Copyright (C) 2014-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -84,11 +84,9 @@ void LoadRequest::setData(const QByteArray &data) m_data = data; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) QWebEngineHttpRequest LoadRequest::webRequest() const { QWebEngineHttpRequest req(m_url, m_operation == GetOperation ? QWebEngineHttpRequest::Get : QWebEngineHttpRequest::Post); req.setPostData(m_data); return req; } -#endif diff --git a/src/lib/webengine/loadrequest.h b/src/lib/webengine/loadrequest.h index 994cc9c4e..e074016f8 100644 --- a/src/lib/webengine/loadrequest.h +++ b/src/lib/webengine/loadrequest.h @@ -1,6 +1,6 @@ /* ============================================================ * Falkon - Qt web browser -* Copyright (C) 2014-2017 David Rosca +* Copyright (C) 2014-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,10 +19,7 @@ #define LOADREQUEST_H #include - -#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) #include -#endif #include "qzcommon.h" @@ -53,9 +50,7 @@ public: QByteArray data() const; void setData(const QByteArray &data); -#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) QWebEngineHttpRequest webRequest() const; -#endif private: QUrl m_url; diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp index 826815826..7d3b9266f 100644 --- a/src/lib/webengine/webview.cpp +++ b/src/lib/webengine/webview.cpp @@ -1266,14 +1266,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) void WebView::loadRequest(const LoadRequest &req) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) QWebEngineView::load(req.webRequest()); -#else - if (req.operation() == LoadRequest::GetOperation) - load(req.url()); - else - page()->runJavaScript(Scripts::sendPostData(req.url(), req.data()), WebPage::SafeJsWorld); -#endif } bool WebView::eventFilter(QObject *obj, QEvent *event) diff --git a/src/plugins/KWalletPasswords/kwalletpasswordbackend.cpp b/src/plugins/KWalletPasswords/kwalletpasswordbackend.cpp index 008515abf..fe4caeb04 100644 --- a/src/plugins/KWalletPasswords/kwalletpasswordbackend.cpp +++ b/src/plugins/KWalletPasswords/kwalletpasswordbackend.cpp @@ -22,11 +22,7 @@ #include -#if QT_VERSION >= 0x050000 #include -#else -#include -#endif static PasswordEntry decodeEntry(const QByteArray &data) { diff --git a/src/plugins/KWalletPasswords/kwalletplugin.cpp b/src/plugins/KWalletPasswords/kwalletplugin.cpp index 65c8929f0..1d2149fe2 100644 --- a/src/plugins/KWalletPasswords/kwalletplugin.cpp +++ b/src/plugins/KWalletPasswords/kwalletplugin.cpp @@ -1,6 +1,6 @@ /* ============================================================ * KWalletPasswords - KWallet support plugin for Falkon -* Copyright (C) 2013-2014 David Rosca +* Copyright (C) 2013-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -69,7 +69,3 @@ QTranslator* KWalletPlugin::getTranslator(const QString &locale) translator->load(locale, ":/kwp/locale/"); return translator; } - -#if QT_VERSION < 0x050000 -Q_EXPORT_PLUGIN2(KWalletPasswords, KWalletPlugin) -#endif diff --git a/src/plugins/KWalletPasswords/kwalletplugin.h b/src/plugins/KWalletPasswords/kwalletplugin.h index fbd27d159..c61b46503 100644 --- a/src/plugins/KWalletPasswords/kwalletplugin.h +++ b/src/plugins/KWalletPasswords/kwalletplugin.h @@ -1,6 +1,6 @@ /* ============================================================ * KWalletPasswords - KWallet support plugin for Falkon -* Copyright (C) 2013-2014 David Rosca +* Copyright (C) 2013-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,10 +26,7 @@ class KWalletPlugin : public QObject, public PluginInterface { Q_OBJECT Q_INTERFACES(PluginInterface) - -#if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "Falkon.Browser.plugin.KWalletPasswords") -#endif public: explicit KWalletPlugin();