proxy-detection was not always restarted in acceptValues, refs #5

master
Marc Wäckerlin 15 years ago
parent e7a9e3cdee
commit f1cac34ea2
  1. 2
      configure.in
  2. 8
      proxyface/proxy.hxx

@ -3,7 +3,7 @@
AC_INIT([README]) AC_INIT([README])
PACKAGENAME=proxyface PACKAGENAME=proxyface
MAJOR=1 MAJOR=1
MINOR=1 MINOR=2
LEAST="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" LEAST="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
for path in . .. ../..; do for path in . .. ../..; do
if svn info $path 2>&1 > /dev/null; then if svn info $path 2>&1 > /dev/null; then

@ -53,17 +53,19 @@ namespace gui {
void acceptValues() { void acceptValues() {
QNetworkProxy::ProxyType type(QNetworkProxy::NoProxy); QNetworkProxy::ProxyType type(QNetworkProxy::NoProxy);
switch (_type->currentIndex()) { switch (_type->currentIndex()) {
case 0: try { case 0: {
_url->setEnabled(false); _url->setEnabled(false);
_port->setEnabled(false); _port->setEnabled(false);
_auto.proxy(_testUrl);
type=QNetworkProxy::NoProxy; type=QNetworkProxy::NoProxy;
} catch (...) {} break; } 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()));
try {
_auto.proxy(_testUrl);
} catch (...) {}
} }
Q_SIGNALS: Q_SIGNALS:

Loading…
Cancel
Save