|
|
|
@ -29,7 +29,7 @@ class Proxy: public QDialog, private Ui::Proxy { |
|
|
|
|
QSettings s("SwissSign", "ProxySettings"); |
|
|
|
|
_type->setCurrentIndex(s.value("default-type", 0).toInt()); |
|
|
|
|
_url->setText(s.value("default-server", QString()).toString()); |
|
|
|
|
_port->setValue(s.value("default-port", 80).toInt()); |
|
|
|
|
_port->setValue(s.value("default-port", 0).toInt()); |
|
|
|
|
connect(&_auto, SIGNAL(proxyFound(const QUrl&, const QNetworkProxy&)), |
|
|
|
|
SLOT(proxyFound(const QUrl&, const QNetworkProxy&))); |
|
|
|
|
accept(); |
|
|
|
@ -74,6 +74,27 @@ class Proxy: public QDialog, private Ui::Proxy { |
|
|
|
|
|
|
|
|
|
void proxyFound(const QUrl&, const QNetworkProxy& p) { |
|
|
|
|
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__save_clicked(bool=false) { |
|
|
|
|