firewall-safe proxy detection 1st try

This commit is contained in:
Marc Wäckerlin
2009-03-30 09:55:43 +00:00
parent 370d305287
commit 6a2e2031c1
4 changed files with 15 additions and 2 deletions

View File

@@ -203,6 +203,9 @@ namespace proxy {
}
}
void replyFinished(QNetworkReply* reply) {
qDebug()<<"Proxydetection got reply with status:"
<<reply->error()<<reply->errorString();
if (reply->error()!=QNetworkReply::NoError) return; // wait for timeout
_timeout.stop();
QNetworkProxy prxy(_requests[reply].second);
QUrl url(reply->url());

View File

@@ -18,7 +18,7 @@
#include <QtCore/QDebug>
class Proxy: public QDialog, private Ui::Proxy {
class Proxy: public QDialog, public Ui::Proxy {
Q_OBJECT

View File

@@ -11,7 +11,11 @@
#include <windows.h>
#include <winhttp.h>
#ifdef QT_NETWORK_LIB
#include <QtCore/QDebug> // debug
#else
#include <iostream> // debug
#endif
namespace proxy {
@@ -50,7 +54,11 @@ namespace proxy {
throw exc::error();
std::wstring list(proxyInfo.lpszProxy);
#ifdef QT_NETWORK_LIB
qDebug()<<"LIST=\""<<proxyInfo.lpszProxy<<"\"";
#else
std::wcout<<"LIST=\""<<list<<"\""<<std::endl;
#endif
for (std::wstring::size_type oldpos(0), pos(0);
(pos=list.find(L";", oldpos))!=std::wstring::npos;
oldpos=++pos) {

View File

@@ -19,4 +19,6 @@ HEADERS = proxyface/unix.hxx proxyface/windoze.hxx \
CONFIG += release
QT += network
TEMPLATE = lib
TARGET = proxyface
TARGET = proxyface
CODECFORSRC = UTF-8
CODECFORTR = UTF-8