mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Remove compatibility code with Qt older than 5.9
This commit is contained in:
parent
ba88aa67a1
commit
087c98343e
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* Falkon - Qt web browser
|
||||
* Copyright (C) 2014-2017 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2014-2018 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* Falkon - Qt web browser
|
||||
* Copyright (C) 2014-2017 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2014-2018 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* 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 <QUrl>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
|
||||
#include <QWebEngineHttpRequest>
|
||||
#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;
|
||||
|
@ -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)
|
||||
|
@ -22,11 +22,7 @@
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <KWallet>
|
||||
#else
|
||||
#include <KDE/KWallet/Wallet>
|
||||
#endif
|
||||
|
||||
static PasswordEntry decodeEntry(const QByteArray &data)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* KWalletPasswords - KWallet support plugin for Falkon
|
||||
* Copyright (C) 2013-2014 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2013-2018 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* KWalletPasswords - KWallet support plugin for Falkon
|
||||
* Copyright (C) 2013-2014 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2013-2018 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* 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();
|
||||
|
Loading…
Reference in New Issue
Block a user