mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +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
|
* 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
|
* 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
|
* 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;
|
m_data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
|
|
||||||
QWebEngineHttpRequest LoadRequest::webRequest() const
|
QWebEngineHttpRequest LoadRequest::webRequest() const
|
||||||
{
|
{
|
||||||
QWebEngineHttpRequest req(m_url, m_operation == GetOperation ? QWebEngineHttpRequest::Get : QWebEngineHttpRequest::Post);
|
QWebEngineHttpRequest req(m_url, m_operation == GetOperation ? QWebEngineHttpRequest::Get : QWebEngineHttpRequest::Post);
|
||||||
req.setPostData(m_data);
|
req.setPostData(m_data);
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* Falkon - Qt web browser
|
* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,10 +19,7 @@
|
|||||||
#define LOADREQUEST_H
|
#define LOADREQUEST_H
|
||||||
|
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
|
|
||||||
#include <QWebEngineHttpRequest>
|
#include <QWebEngineHttpRequest>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "qzcommon.h"
|
#include "qzcommon.h"
|
||||||
|
|
||||||
@ -53,9 +50,7 @@ public:
|
|||||||
QByteArray data() const;
|
QByteArray data() const;
|
||||||
void setData(const QByteArray &data);
|
void setData(const QByteArray &data);
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
|
|
||||||
QWebEngineHttpRequest webRequest() const;
|
QWebEngineHttpRequest webRequest() const;
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QUrl m_url;
|
QUrl m_url;
|
||||||
|
@ -1266,14 +1266,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
|
|
||||||
void WebView::loadRequest(const LoadRequest &req)
|
void WebView::loadRequest(const LoadRequest &req)
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
|
|
||||||
QWebEngineView::load(req.webRequest());
|
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)
|
bool WebView::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
@ -22,11 +22,7 @@
|
|||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
#include <KWallet>
|
#include <KWallet>
|
||||||
#else
|
|
||||||
#include <KDE/KWallet/Wallet>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static PasswordEntry decodeEntry(const QByteArray &data)
|
static PasswordEntry decodeEntry(const QByteArray &data)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* KWalletPasswords - KWallet support plugin for Falkon
|
* 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
|
* 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
|
* 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/");
|
translator->load(locale, ":/kwp/locale/");
|
||||||
return translator;
|
return translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION < 0x050000
|
|
||||||
Q_EXPORT_PLUGIN2(KWalletPasswords, KWalletPlugin)
|
|
||||||
#endif
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* KWalletPasswords - KWallet support plugin for Falkon
|
* 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
|
* 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
|
* 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_OBJECT
|
||||||
Q_INTERFACES(PluginInterface)
|
Q_INTERFACES(PluginInterface)
|
||||||
|
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
Q_PLUGIN_METADATA(IID "Falkon.Browser.plugin.KWalletPasswords")
|
Q_PLUGIN_METADATA(IID "Falkon.Browser.plugin.KWalletPasswords")
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit KWalletPlugin();
|
explicit KWalletPlugin();
|
||||||
|
Loading…
Reference in New Issue
Block a user