no more multithreading; no more fallback
This commit is contained in:
@@ -18,4 +18,3 @@ make clean && \
|
||||
./configure && \
|
||||
make check && \
|
||||
sudo make install
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include <QtNetwork/QSslError>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QThread>
|
||||
// #include <QtCore/QThread>
|
||||
#include <map>
|
||||
#endif
|
||||
|
||||
@@ -77,7 +77,8 @@ namespace proxy {
|
||||
@example test.cxx */
|
||||
class Interface
|
||||
#ifdef QT_NETWORK_LIB
|
||||
: public QThread
|
||||
// : public QThread
|
||||
: public QObject
|
||||
#endif
|
||||
{
|
||||
#ifdef QT_NETWORK_LIB
|
||||
@@ -91,8 +92,8 @@ namespace proxy {
|
||||
qFatal("connect failed");
|
||||
if (!connect(&_timeout2, SIGNAL(timeout()), SLOT(timeout())))
|
||||
qFatal("connect failed");
|
||||
if (!connect(this, SIGNAL(finished()), SLOT(threadFinished())))
|
||||
qFatal("connect failed");
|
||||
// if (!connect(this, SIGNAL(finished()), SLOT(threadFinished())))
|
||||
// qFatal("connect failed");
|
||||
#endif
|
||||
}
|
||||
virtual ~Interface() {}
|
||||
@@ -212,7 +213,10 @@ namespace proxy {
|
||||
" try autoproxy negotiation";
|
||||
_direct = false;
|
||||
_url = url;
|
||||
start(); // autoproxy detection in own thread
|
||||
/****BUGFIX****/
|
||||
_proxies = proxies(_url);
|
||||
threadFinished();
|
||||
//start(); // autoproxy detection in own thread
|
||||
} else {
|
||||
qDebug()<<"No proxy at all, giving up - offline?";
|
||||
proxyError(QNetworkReply::TimeoutError);
|
||||
|
@@ -52,6 +52,7 @@ namespace gui {
|
||||
case 0: try {
|
||||
_url->setEnabled(false);
|
||||
_port->setEnabled(false);
|
||||
_auto.proxy(_testUrl);
|
||||
type=QNetworkProxy::NoProxy;
|
||||
} catch (...) {} break;
|
||||
case 1: type=QNetworkProxy::HttpProxy; break;
|
||||
@@ -59,7 +60,6 @@ namespace gui {
|
||||
}
|
||||
QNetworkProxy::setApplicationProxy
|
||||
(QNetworkProxy(type, _url->text(), _port->value()));
|
||||
_auto.proxy(_testUrl);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
|
Reference in New Issue
Block a user