firewall-safe proxy detection 1st try

master
Marc Wäckerlin 16 years ago
parent 370d305287
commit 6a2e2031c1
  1. 3
      autoproxy.hxx
  2. 2
      proxyface/gui/proxy.hxx
  3. 8
      proxyface/windoze.hxx
  4. 4
      qmake.pro

@ -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());

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

@ -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) {

@ -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

Loading…
Cancel
Save