mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Cleanups
Remove PAC proxy option as it is hardly to ever be supported in QtWebEngine.
This commit is contained in:
parent
7050ffc9e6
commit
6a2579a22c
@ -38,78 +38,4 @@ private:
|
||||
QHash<QString, QWebEngineCertificateError::Error> m_ignoredSslErrors;
|
||||
};
|
||||
|
||||
#if QTWEBENGINE_DISABLED
|
||||
|
||||
#include <QSslError>
|
||||
#include <QStringList>
|
||||
|
||||
#include "qzcommon.h"
|
||||
#include "networkmanagerproxy.h"
|
||||
|
||||
class AdBlockManager;
|
||||
class NetworkProxyFactory;
|
||||
class QupZillaSchemeHandler;
|
||||
class SchemeHandler;
|
||||
|
||||
class QUPZILLA_EXPORT NetworkManager : public NetworkManagerProxy
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit NetworkManager(QObject* parent = 0);
|
||||
QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData);
|
||||
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void loadCertificates();
|
||||
|
||||
QList<QSslCertificate> getCaCertificates() { return m_caCerts; }
|
||||
QList<QSslCertificate> getLocalCertificates() { return m_localCerts; }
|
||||
|
||||
void removeLocalCertificate(const QSslCertificate &cert);
|
||||
void addLocalCertificate(const QSslCertificate &cert);
|
||||
|
||||
void setCertificatePaths(const QStringList &paths) { m_certPaths = paths; }
|
||||
QStringList certificatePaths() { return m_certPaths; }
|
||||
|
||||
bool isIgnoringAllWarnings() const;
|
||||
void setIgnoreAllWarnings(bool state);
|
||||
|
||||
bool isDisablingWeakCiphers() const;
|
||||
void setDisableWeakCiphers(bool state);
|
||||
|
||||
NetworkProxyFactory* proxyFactory() const;
|
||||
|
||||
bool registerSchemeHandler(const QString &scheme, SchemeHandler* handler);
|
||||
bool unregisterSchemeHandler(const QString &scheme, SchemeHandler* handler);
|
||||
|
||||
signals:
|
||||
void sslDialogClosed();
|
||||
|
||||
private slots:
|
||||
void ftpAuthentication(const QUrl &url, QAuthenticator* auth);
|
||||
void sslError(QNetworkReply* reply, QList<QSslError> errors);
|
||||
void setSSLConfiguration(QNetworkReply* reply);
|
||||
|
||||
private:
|
||||
void disableWeakCiphers(bool disable);
|
||||
|
||||
AdBlockManager* m_adblockManager;
|
||||
NetworkProxyFactory* m_proxyFactory;
|
||||
|
||||
QStringList m_certPaths;
|
||||
QList<QSslCertificate> m_caCerts;
|
||||
QList<QSslCertificate> m_localCerts;
|
||||
QList<QSslCertificate> m_tempAllowedCerts;
|
||||
|
||||
QHash<QString, SchemeHandler*> m_schemeHandlers;
|
||||
QByteArray m_acceptLanguage;
|
||||
|
||||
bool m_ignoreAllWarnings;
|
||||
bool m_disableWeakCiphers;
|
||||
bool m_doNotTrack;
|
||||
bool m_sendReferer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // NETWORKMANAGER_H
|
||||
|
@ -47,7 +47,6 @@
|
||||
#include "registerqappassociation.h"
|
||||
#include "profilemanager.h"
|
||||
#include "html5permissions/html5permissionsdialog.h"
|
||||
#include "pac/pacmanager.h"
|
||||
#include "searchenginesdialog.h"
|
||||
|
||||
#include <QSettings>
|
||||
@ -426,7 +425,6 @@ Preferences::Preferences(BrowserWindow* window)
|
||||
ui->systemProxy->setChecked(proxyPreference == NetworkProxyFactory::SystemProxy);
|
||||
ui->noProxy->setChecked(proxyPreference == NetworkProxyFactory::NoProxy);
|
||||
ui->manualProxy->setChecked(proxyPreference == NetworkProxyFactory::DefinedProxy);
|
||||
ui->pacProxy->setChecked(proxyPreference == NetworkProxyFactory::ProxyAutoConfig);
|
||||
if (proxyType == QNetworkProxy::HttpProxy) {
|
||||
ui->proxyType->setCurrentIndex(0);
|
||||
}
|
||||
@ -445,18 +443,14 @@ Preferences::Preferences(BrowserWindow* window)
|
||||
ui->httpsProxyUsername->setText(settings.value("HttpsUsername", "").toString());
|
||||
ui->httpsProxyPassword->setText(settings.value("HttpsPassword", "").toString());
|
||||
|
||||
ui->pacUrl->setText(settings.value("PacUrl", QUrl()).toUrl().toString());
|
||||
ui->proxyExceptions->setText(settings.value("ProxyExceptions", QStringList() << "localhost" << "127.0.0.1").toStringList().join(","));
|
||||
settings.endGroup();
|
||||
|
||||
useDifferentProxyForHttpsChanged(ui->useHttpsProxy->isChecked());
|
||||
setManualProxyConfigurationEnabled(proxyPreference == NetworkProxyFactory::DefinedProxy);
|
||||
setProxyAutoConfigEnabled(proxyPreference == NetworkProxyFactory::ProxyAutoConfig);
|
||||
|
||||
connect(ui->manualProxy, SIGNAL(toggled(bool)), this, SLOT(setManualProxyConfigurationEnabled(bool)));
|
||||
connect(ui->pacProxy, SIGNAL(toggled(bool)), this, SLOT(setProxyAutoConfigEnabled(bool)));
|
||||
connect(ui->useHttpsProxy, SIGNAL(toggled(bool)), this, SLOT(useDifferentProxyForHttpsChanged(bool)));
|
||||
connect(ui->reloadPac, SIGNAL(clicked()), this, SLOT(reloadPacFileClicked()));
|
||||
|
||||
//CONNECTS
|
||||
connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*)));
|
||||
@ -633,12 +627,6 @@ void Preferences::setManualProxyConfigurationEnabled(bool state)
|
||||
ui->useHttpsProxy->setEnabled(state);
|
||||
}
|
||||
|
||||
void Preferences::setProxyAutoConfigEnabled(bool state)
|
||||
{
|
||||
ui->pacUrl->setEnabled(state);
|
||||
ui->reloadPac->setEnabled(state);
|
||||
}
|
||||
|
||||
void Preferences::saveHistoryChanged(bool stat)
|
||||
{
|
||||
ui->deleteHistoryOnClose->setEnabled(stat);
|
||||
@ -717,13 +705,6 @@ void Preferences::changeCachePathClicked()
|
||||
ui->cachePath->setText(path);
|
||||
}
|
||||
|
||||
void Preferences::reloadPacFileClicked()
|
||||
{
|
||||
#if QTWEBENGINE_DISABLED
|
||||
mApp->networkManager()->proxyFactory()->pacManager()->downloadPacFile();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Preferences::showPassManager(bool state)
|
||||
{
|
||||
if (m_autoFillManager) {
|
||||
@ -995,9 +976,6 @@ void Preferences::saveSettings()
|
||||
else if (ui->noProxy->isChecked()) {
|
||||
proxyPreference = NetworkProxyFactory::NoProxy;
|
||||
}
|
||||
else if (ui->pacProxy->isChecked()) {
|
||||
proxyPreference = NetworkProxyFactory::ProxyAutoConfig;
|
||||
}
|
||||
else {
|
||||
proxyPreference = NetworkProxyFactory::DefinedProxy;
|
||||
}
|
||||
@ -1024,7 +1002,6 @@ void Preferences::saveSettings()
|
||||
settings.setValue("HttpsUsername", ui->httpsProxyUsername->text());
|
||||
settings.setValue("HttpsPassword", ui->httpsProxyPassword->text());
|
||||
|
||||
settings.setValue("PacUrl", ui->pacUrl->text());
|
||||
settings.setValue("ProxyExceptions", ui->proxyExceptions->text().split(QLatin1Char(','), QString::SkipEmptyParts));
|
||||
settings.endGroup();
|
||||
|
||||
|
@ -70,11 +70,9 @@ private slots:
|
||||
void allowCacheChanged(bool state);
|
||||
void showPassManager(bool state);
|
||||
void setManualProxyConfigurationEnabled(bool state);
|
||||
void setProxyAutoConfigEnabled(bool state);
|
||||
void useDifferentProxyForHttpsChanged(bool state);
|
||||
void showTabPreviewsChanged(bool state);
|
||||
void changeCachePathClicked();
|
||||
void reloadPacFileClicked();
|
||||
|
||||
void newTabChanged(int value);
|
||||
void afterLaunchChanged(int value);
|
||||
|
@ -1405,48 +1405,14 @@
|
||||
<string>Proxy Configuration</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="9" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_22">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="pacUrl">
|
||||
<property name="placeholderText">
|
||||
<string>Proxy Auto-Config (.pac) file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="reloadPac">
|
||||
<property name="text">
|
||||
<string>Reload</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_27">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="2">
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_54">
|
||||
<property name="text">
|
||||
<string><b>Exceptions</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<item row="9" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_27">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_40">
|
||||
@ -1460,7 +1426,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<item row="10" column="0">
|
||||
<spacer name="verticalSpacer_14">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -1653,13 +1619,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="pacProxy">
|
||||
<property name="text">
|
||||
<string>Use script for automatic configuration:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="noProxy">
|
||||
<property name="text">
|
||||
|
@ -514,13 +514,6 @@ void WebView::downloadUrlToDisk()
|
||||
#endif
|
||||
}
|
||||
|
||||
void WebView::copyImageToClipboard()
|
||||
{
|
||||
#if QTWEBENGINE_DISABLED
|
||||
triggerPageAction(QWebEnginePage::CopyImageToClipboard);
|
||||
#endif
|
||||
}
|
||||
|
||||
void WebView::openActionUrl()
|
||||
{
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
@ -800,7 +793,6 @@ void WebView::createImageContextMenu(QMenu* menu, const WebHitTestResult &hitTes
|
||||
connect(act, SIGNAL(triggered()), this, SLOT(openActionUrl()));
|
||||
connect(act, SIGNAL(ctrlTriggered()), this, SLOT(userDefinedOpenUrlInNewTab()));
|
||||
menu->addAction(act);
|
||||
menu->addAction(tr("Copy im&age"), this, SLOT(copyImageToClipboard()))->setData(hitTest.imageUrl());
|
||||
menu->addAction(QIcon::fromTheme("edit-copy"), tr("Copy image ad&dress"), this, SLOT(copyLinkToClipboard()))->setData(hitTest.imageUrl());
|
||||
menu->addSeparator();
|
||||
#if QTWEBENGINE_DISABLED
|
||||
|
@ -120,7 +120,6 @@ protected slots:
|
||||
void sendLinkByMail();
|
||||
void copyLinkToClipboard();
|
||||
void downloadUrlToDisk();
|
||||
void copyImageToClipboard();
|
||||
void openActionUrl();
|
||||
void showSiteInfo();
|
||||
void searchSelectedText();
|
||||
|
Loading…
Reference in New Issue
Block a user