|
|
@ -15,7 +15,7 @@ |
|
|
|
#include <QtNetwork/QSslError> |
|
|
|
#include <QtNetwork/QSslError> |
|
|
|
#include <QtCore/QTimer> |
|
|
|
#include <QtCore/QTimer> |
|
|
|
#include <QtCore/QDebug> |
|
|
|
#include <QtCore/QDebug> |
|
|
|
#include <QtCore/QThread> |
|
|
|
// #include <QtCore/QThread>
|
|
|
|
#include <map> |
|
|
|
#include <map> |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
@ -77,7 +77,8 @@ namespace proxy { |
|
|
|
@example test.cxx */ |
|
|
|
@example test.cxx */ |
|
|
|
class Interface |
|
|
|
class Interface |
|
|
|
#ifdef QT_NETWORK_LIB |
|
|
|
#ifdef QT_NETWORK_LIB |
|
|
|
: public QThread |
|
|
|
// : public QThread
|
|
|
|
|
|
|
|
: public QObject |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef QT_NETWORK_LIB |
|
|
|
#ifdef QT_NETWORK_LIB |
|
|
@ -91,8 +92,8 @@ namespace proxy { |
|
|
|
qFatal("connect failed"); |
|
|
|
qFatal("connect failed"); |
|
|
|
if (!connect(&_timeout2, SIGNAL(timeout()), SLOT(timeout()))) |
|
|
|
if (!connect(&_timeout2, SIGNAL(timeout()), SLOT(timeout()))) |
|
|
|
qFatal("connect failed"); |
|
|
|
qFatal("connect failed"); |
|
|
|
if (!connect(this, SIGNAL(finished()), SLOT(threadFinished()))) |
|
|
|
// if (!connect(this, SIGNAL(finished()), SLOT(threadFinished())))
|
|
|
|
qFatal("connect failed"); |
|
|
|
// qFatal("connect failed");
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
virtual ~Interface() {} |
|
|
|
virtual ~Interface() {} |
|
|
@ -212,7 +213,10 @@ namespace proxy { |
|
|
|
" try autoproxy negotiation"; |
|
|
|
" try autoproxy negotiation"; |
|
|
|
_direct = false; |
|
|
|
_direct = false; |
|
|
|
_url = url; |
|
|
|
_url = url; |
|
|
|
start(); // autoproxy detection in own thread
|
|
|
|
/****BUGFIX****/ |
|
|
|
|
|
|
|
_proxies = proxies(_url); |
|
|
|
|
|
|
|
threadFinished(); |
|
|
|
|
|
|
|
//start(); // autoproxy detection in own thread
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
qDebug()<<"No proxy at all, giving up - offline?"; |
|
|
|
qDebug()<<"No proxy at all, giving up - offline?"; |
|
|
|
proxyError(QNetworkReply::TimeoutError); |
|
|
|
proxyError(QNetworkReply::TimeoutError); |
|
|
|