fix for C++17
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#define PROXYFACE_HXX
|
||||
|
||||
#if HAVE_QT == 1
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#include <QtNetwork/QNetworkProxy>
|
||||
#include <QtNetwork/QNetworkAccessManager>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
@@ -18,6 +20,7 @@
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QThread>
|
||||
#pragma GCC diagnostic pop
|
||||
#include <map>
|
||||
#ifndef PROXYFACE_LOG
|
||||
#define PROXYFACE_LOG qDebug()<<__PRETTY_FUNCTION__
|
||||
@@ -307,7 +310,7 @@ namespace proxy {
|
||||
if (getenv("HTTP_PROXY")) {
|
||||
QUrl proxy(QString(getenv("HTTP_PROXY")));
|
||||
QNetworkProxy envProxy(QNetworkProxy::HttpProxy,
|
||||
proxy.host(), proxy.port(),
|
||||
proxy.host(), (quint16)proxy.port(),
|
||||
proxy.userName(), proxy.password());
|
||||
setupProxyCheck(envProxy, url);
|
||||
}
|
||||
@@ -517,7 +520,7 @@ namespace proxy {
|
||||
:(it->type==HTTP?QNetworkProxy::HttpProxy
|
||||
:(it->type==SOCKS?QNetworkProxy::Socks5Proxy
|
||||
:QNetworkProxy::NoProxy))),
|
||||
QString::fromStdString(it->host), it->port);
|
||||
QString::fromStdString(it->host), (quint16)it->port);
|
||||
setupProxyCheck(prxy, _url);
|
||||
}
|
||||
QNetworkProxy directProxy(QNetworkProxy::NoProxy);
|
||||
|
@@ -9,9 +9,11 @@
|
||||
#define PROXY_HXX
|
||||
|
||||
#include <proxyface/autoproxy.hxx>
|
||||
#include <proxyface/ui_proxy.hxx>
|
||||
#include <proxyface/proxyauth.hxx>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#include <proxyface/ui_proxy.hxx>
|
||||
#include <QtGui/QMovie>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets/QDialog>
|
||||
@@ -25,8 +27,9 @@
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtCore/QSettings>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace gui {
|
||||
@@ -199,13 +202,13 @@ namespace gui {
|
||||
case 1: {
|
||||
QNetworkProxy::setApplicationProxy
|
||||
(QNetworkProxy
|
||||
(QNetworkProxy::HttpProxy, _url->text(), _port->value()));
|
||||
(QNetworkProxy::HttpProxy, _url->text(), (quint16)_port->value()));
|
||||
_auto.ping(_testUrl->currentText());
|
||||
} break;
|
||||
case 2: {
|
||||
QNetworkProxy::setApplicationProxy
|
||||
(QNetworkProxy
|
||||
(QNetworkProxy::Socks5Proxy, _url->text(), _port->value(),
|
||||
(QNetworkProxy::Socks5Proxy, _url->text(), (quint16)_port->value(),
|
||||
"marwae", "marwae"));
|
||||
_auto.ping(_testUrl->currentText());
|
||||
} break;
|
||||
|
@@ -8,12 +8,15 @@
|
||||
#ifndef __PROXYAUTH_HXX__
|
||||
#define __PROXYAUTH_HXX__
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#include <proxyface/ui_proxyauth.hxx>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets/QDialog>
|
||||
#else
|
||||
#include <QtGui/QDialog>
|
||||
#endif
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
class ProxyAuth: public QDialog, public Ui::ProxyAuth {
|
||||
Q_OBJECT
|
||||
|
Reference in New Issue
Block a user