|
|
@ -53,32 +53,13 @@ namespace gui { |
|
|
|
_url->setEnabled(false); |
|
|
|
_url->setEnabled(false); |
|
|
|
_port->setEnabled(false); |
|
|
|
_port->setEnabled(false); |
|
|
|
type=QNetworkProxy::NoProxy; |
|
|
|
type=QNetworkProxy::NoProxy; |
|
|
|
_auto.proxy(_testUrl); |
|
|
|
|
|
|
|
} catch (...) {} break; |
|
|
|
} catch (...) {} break; |
|
|
|
case 1: type=QNetworkProxy::HttpProxy; break; |
|
|
|
case 1: type=QNetworkProxy::HttpProxy; break; |
|
|
|
case 2: type=QNetworkProxy::Socks5Proxy; break; |
|
|
|
case 2: type=QNetworkProxy::Socks5Proxy; break; |
|
|
|
} |
|
|
|
} |
|
|
|
QNetworkProxy::setApplicationProxy |
|
|
|
QNetworkProxy::setApplicationProxy |
|
|
|
(QNetworkProxy(type, _url->text(), _port->value())); |
|
|
|
(QNetworkProxy(type, _url->text(), _port->value())); |
|
|
|
qDebug()<<"Proxy:" |
|
|
|
_auto.proxy(_testUrl); |
|
|
|
<<(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())); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Q_SIGNALS: |
|
|
|
Q_SIGNALS: |
|
|
@ -92,25 +73,6 @@ namespace gui { |
|
|
|
QNetworkProxy::setApplicationProxy(p); |
|
|
|
QNetworkProxy::setApplicationProxy(p); |
|
|
|
_url->setText(p.hostName()); |
|
|
|
_url->setText(p.hostName()); |
|
|
|
_port->setValue(p.port()); |
|
|
|
_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) { |
|
|
|
void on__type_currentIndexChanged(int index) { |
|
|
|