|
|
|
@ -53,32 +53,13 @@ namespace gui { |
|
|
|
|
_url->setEnabled(false); |
|
|
|
|
_port->setEnabled(false); |
|
|
|
|
type=QNetworkProxy::NoProxy; |
|
|
|
|
_auto.proxy(_testUrl); |
|
|
|
|
} catch (...) {} break; |
|
|
|
|
case 1: type=QNetworkProxy::HttpProxy; break; |
|
|
|
|
case 2: type=QNetworkProxy::Socks5Proxy; break; |
|
|
|
|
} |
|
|
|
|
QNetworkProxy::setApplicationProxy |
|
|
|
|
(QNetworkProxy(type, _url->text(), _port->value())); |
|
|
|
|
qDebug()<<"Proxy:" |
|
|
|
|
<<(QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::NoProxy |
|
|
|
|
?trUtf8("Kein Proxy") |
|
|
|
|
:QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::HttpProxy |
|
|
|
|
?trUtf8("HTTP:") |
|
|
|
|
:QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::Socks5Proxy |
|
|
|
|
?trUtf8("Socks5Proxy:") |
|
|
|
|
:trUtf8("System")) |
|
|
|
|
<<(QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::NoProxy || |
|
|
|
|
QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::DefaultProxy |
|
|
|
|
?QString() |
|
|
|
|
:trUtf8("%1:%2", "proxy host/port") |
|
|
|
|
.arg(QNetworkProxy::applicationProxy().hostName()) |
|
|
|
|
.arg(QNetworkProxy::applicationProxy().port())); |
|
|
|
|
_auto.proxy(_testUrl); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Q_SIGNALS: |
|
|
|
@ -92,25 +73,6 @@ namespace gui { |
|
|
|
|
QNetworkProxy::setApplicationProxy(p); |
|
|
|
|
_url->setText(p.hostName()); |
|
|
|
|
_port->setValue(p.port()); |
|
|
|
|
qDebug()<<"Auto Proxy Found:" |
|
|
|
|
<<(QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::NoProxy |
|
|
|
|
?trUtf8("Kein Proxy") |
|
|
|
|
:QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::HttpProxy |
|
|
|
|
?trUtf8("HTTP:") |
|
|
|
|
:QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::Socks5Proxy |
|
|
|
|
?trUtf8("Socks5Proxy:") |
|
|
|
|
:trUtf8("System")) |
|
|
|
|
<<(QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::NoProxy || |
|
|
|
|
QNetworkProxy::applicationProxy().type() |
|
|
|
|
==QNetworkProxy::DefaultProxy |
|
|
|
|
?QString() |
|
|
|
|
:trUtf8("%1:%2", "proxy host/port") |
|
|
|
|
.arg(QNetworkProxy::applicationProxy().hostName()) |
|
|
|
|
.arg(QNetworkProxy::applicationProxy().port())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void on__type_currentIndexChanged(int index) { |
|
|
|
|