new dialog and new library, refs #6
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
#include <QtNetwork/QNetworkProxy>
|
#include <QtNetwork/QNetworkProxy>
|
||||||
#include <QtNetwork/QNetworkAccessManager>
|
#include <QtNetwork/QNetworkAccessManager>
|
||||||
#include <QtNetwork/QNetworkReply>
|
#include <QtNetwork/QNetworkReply>
|
||||||
|
#include <QtNetwork/QAuthenticator>
|
||||||
#include <QtNetwork/QSslError>
|
#include <QtNetwork/QSslError>
|
||||||
#include <QtNetwork/QHostInfo>
|
#include <QtNetwork/QHostInfo>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
@@ -31,6 +32,8 @@
|
|||||||
|
|
||||||
//! auto proxy configuration
|
//! auto proxy configuration
|
||||||
namespace proxy {
|
namespace proxy {
|
||||||
|
|
||||||
|
std::string version();
|
||||||
|
|
||||||
//! exceptions
|
//! exceptions
|
||||||
namespace exc {
|
namespace exc {
|
||||||
@@ -95,7 +98,11 @@ namespace proxy {
|
|||||||
#endif
|
#endif
|
||||||
public:
|
public:
|
||||||
//! Keep your instance as long as possible, because of caching.
|
//! Keep your instance as long as possible, because of caching.
|
||||||
Interface() {
|
Interface()
|
||||||
|
#ifdef QT_NETWORK_LIB
|
||||||
|
: _timeout1Paused(false), _timeout2Paused(false)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
#ifdef QT_NETWORK_LIB
|
#ifdef QT_NETWORK_LIB
|
||||||
PROXYFACE_LOG;
|
PROXYFACE_LOG;
|
||||||
if (!connect(&_timeout1, SIGNAL(timeout()), SLOT(timeout())))
|
if (!connect(&_timeout1, SIGNAL(timeout()), SLOT(timeout())))
|
||||||
@@ -121,6 +128,35 @@ namespace proxy {
|
|||||||
clean(it->second.first);
|
clean(it->second.first);
|
||||||
_requests.clear();
|
_requests.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Pause timeouts and restart them later.
|
||||||
|
/*! Use while waiting for user input at proxy authentication.
|
||||||
|
@see restart() */
|
||||||
|
void pause() {
|
||||||
|
if (_timeout1.isActive()) {
|
||||||
|
_timeout1.stop();
|
||||||
|
_timeout1Paused = true;
|
||||||
|
}
|
||||||
|
if (_timeout2.isActive()) {
|
||||||
|
_timeout2.stop();
|
||||||
|
_timeout2Paused = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Restart paused timeouts.
|
||||||
|
/*! Use while waiting for user input at proxy authentication.
|
||||||
|
@see pause() */
|
||||||
|
void restart() {
|
||||||
|
if (_timeout1Paused) {
|
||||||
|
_timeout1.start();
|
||||||
|
_timeout1Paused = false;
|
||||||
|
}
|
||||||
|
if (_timeout2Paused) {
|
||||||
|
_timeout2.start();
|
||||||
|
_timeout2Paused = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//! Network Ping: Check access to a given address using default proxy.
|
//! Network Ping: Check access to a given address using default proxy.
|
||||||
void ping(const std::string& url, int timeout2=30000) {
|
void ping(const std::string& url, int timeout2=30000) {
|
||||||
if (_requests.size() || _timeout1.isActive() || _timeout2.isActive())
|
if (_requests.size() || _timeout1.isActive() || _timeout2.isActive())
|
||||||
@@ -214,6 +250,8 @@ namespace proxy {
|
|||||||
void proxyError(QNetworkReply::NetworkError);
|
void proxyError(QNetworkReply::NetworkError);
|
||||||
//! Signals an error during proxy detection.
|
//! Signals an error during proxy detection.
|
||||||
void temporaryError(QNetworkReply::NetworkError, QString, QString);
|
void temporaryError(QNetworkReply::NetworkError, QString, QString);
|
||||||
|
void authenticationRequired(QNetworkReply*, QAuthenticator*);
|
||||||
|
void proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*);
|
||||||
private:
|
private:
|
||||||
void setupProxyCheck(const QNetworkProxy& prxy, const std::string& url) {
|
void setupProxyCheck(const QNetworkProxy& prxy, const std::string& url) {
|
||||||
PROXYFACE_LOG;
|
PROXYFACE_LOG;
|
||||||
@@ -223,17 +261,26 @@ namespace proxy {
|
|||||||
if (!connect(manager, SIGNAL(finished(QNetworkReply*)),
|
if (!connect(manager, SIGNAL(finished(QNetworkReply*)),
|
||||||
SLOT(replyFinished(QNetworkReply*))))
|
SLOT(replyFinished(QNetworkReply*))))
|
||||||
qFatal("connect failed");
|
qFatal("connect failed");
|
||||||
connect(manager,
|
if (!connect(manager,
|
||||||
SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
|
SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
|
||||||
SLOT(authenticationRequired(QNetworkReply*, QAuthenticator*)));
|
SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*))))
|
||||||
connect(manager,
|
qFatal("connect failed");
|
||||||
SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&,
|
if (!connect(manager,
|
||||||
QAuthenticator*)),
|
SIGNAL(proxyAuthenticationRequired
|
||||||
SLOT(proxyAuthenticationRequired(const QNetworkProxy&,
|
(const QNetworkProxy&, QAuthenticator*)),
|
||||||
QAuthenticator*)));
|
SIGNAL(proxyAuthenticationRequired
|
||||||
connect(manager,
|
(const QNetworkProxy&, QAuthenticator*))))
|
||||||
SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
|
qFatal("connect failed");
|
||||||
SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&)));
|
if (!connect(manager,
|
||||||
|
SIGNAL(proxyAuthenticationRequired
|
||||||
|
(const QNetworkProxy&, QAuthenticator*)),
|
||||||
|
SLOT(proxyAuthenticationRequiredLog
|
||||||
|
(const QNetworkProxy&, QAuthenticator*))))
|
||||||
|
qFatal("connect failed");
|
||||||
|
if (!connect(manager,
|
||||||
|
SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
|
||||||
|
SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&))))
|
||||||
|
qFatal("connect failed");
|
||||||
_requests.insert
|
_requests.insert
|
||||||
(std::make_pair(manager->head
|
(std::make_pair(manager->head
|
||||||
(QNetworkRequest
|
(QNetworkRequest
|
||||||
@@ -248,14 +295,20 @@ namespace proxy {
|
|||||||
SIGNAL(authenticationRequired(QNetworkReply*,
|
SIGNAL(authenticationRequired(QNetworkReply*,
|
||||||
QAuthenticator*)),
|
QAuthenticator*)),
|
||||||
this,
|
this,
|
||||||
SLOT(authenticationRequired(QNetworkReply*,
|
SIGNAL(authenticationRequired(QNetworkReply*,
|
||||||
QAuthenticator*)));
|
QAuthenticator*)));
|
||||||
disconnect(manager,
|
disconnect(manager,
|
||||||
SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&,
|
SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&,
|
||||||
QAuthenticator*)),
|
QAuthenticator*)),
|
||||||
this,
|
this,
|
||||||
SLOT(proxyAuthenticationRequired(const QNetworkProxy&,
|
SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&,
|
||||||
QAuthenticator*)));
|
QAuthenticator*)));
|
||||||
|
disconnect(manager,
|
||||||
|
SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&,
|
||||||
|
QAuthenticator*)),
|
||||||
|
this,
|
||||||
|
SLOT(proxyAuthenticationRequiredLog(const QNetworkProxy&,
|
||||||
|
QAuthenticator*)));
|
||||||
disconnect(manager,
|
disconnect(manager,
|
||||||
SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
|
SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
|
||||||
this,
|
this,
|
||||||
@@ -263,6 +316,13 @@ namespace proxy {
|
|||||||
//delete manager;
|
//delete manager;
|
||||||
}
|
}
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void proxyAuthenticationRequiredLog(const QNetworkProxy&,
|
||||||
|
QAuthenticator* auth) {
|
||||||
|
qDebug()<<"proxyAuthenticationRequired for "<<auth->realm();
|
||||||
|
}
|
||||||
|
void bullshit() {
|
||||||
|
qDebug()<<"SCHEISSE";
|
||||||
|
}
|
||||||
void timeout() {
|
void timeout() {
|
||||||
PROXYFACE_LOG;
|
PROXYFACE_LOG;
|
||||||
reset();
|
reset();
|
||||||
@@ -297,14 +357,6 @@ namespace proxy {
|
|||||||
<<"url="<<url<<"proxy="<<toString(prxy);
|
<<"url="<<url<<"proxy="<<toString(prxy);
|
||||||
proxyFound(url, prxy);
|
proxyFound(url, prxy);
|
||||||
}
|
}
|
||||||
void authenticationRequired(QNetworkReply*, QAuthenticator*) {
|
|
||||||
PROXYFACE_LOG;
|
|
||||||
qDebug()<<"## "<<__PRETTY_FUNCTION__;
|
|
||||||
}
|
|
||||||
void proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*) {
|
|
||||||
PROXYFACE_LOG;
|
|
||||||
qDebug()<<"## "<<__PRETTY_FUNCTION__;
|
|
||||||
}
|
|
||||||
void sslErrors(QNetworkReply*, const QList<QSslError>& l) {
|
void sslErrors(QNetworkReply*, const QList<QSslError>& l) {
|
||||||
PROXYFACE_LOG;
|
PROXYFACE_LOG;
|
||||||
qDebug()<<"## "<<__PRETTY_FUNCTION__;
|
qDebug()<<"## "<<__PRETTY_FUNCTION__;
|
||||||
@@ -344,6 +396,8 @@ namespace proxy {
|
|||||||
bool _direct;
|
bool _direct;
|
||||||
QTimer _timeout1;
|
QTimer _timeout1;
|
||||||
QTimer _timeout2;
|
QTimer _timeout2;
|
||||||
|
bool _timeout1Paused;
|
||||||
|
bool _timeout2Paused;
|
||||||
List _proxies;
|
List _proxies;
|
||||||
std::string _url;
|
std::string _url;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -10,14 +10,18 @@
|
|||||||
|
|
||||||
#include <proxyface/autoproxy.hxx>
|
#include <proxyface/autoproxy.hxx>
|
||||||
#include <proxyface/ui_proxy.hxx>
|
#include <proxyface/ui_proxy.hxx>
|
||||||
|
#include <proxyface/proxyauth.hxx>
|
||||||
|
|
||||||
#include <QtGui/QMovie>
|
#include <QtGui/QMovie>
|
||||||
#include <QtGui/QDialog>
|
#include <QtGui/QDialog>
|
||||||
#include <QtGui/QPushButton>
|
#include <QtGui/QPushButton>
|
||||||
#include <QtNetwork/QNetworkProxy>
|
#include <QtNetwork/QNetworkProxy>
|
||||||
|
#include <QtNetwork/QAuthenticator>
|
||||||
#include <QtCore/QUrl>
|
#include <QtCore/QUrl>
|
||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
namespace gui {
|
namespace gui {
|
||||||
|
|
||||||
@@ -31,13 +35,18 @@ namespace gui {
|
|||||||
QDialog(p), _lastDefaultProxy(QNetworkProxy()) {
|
QDialog(p), _lastDefaultProxy(QNetworkProxy()) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
_testUrl->insertItem(0, testUrl);
|
_testUrl->insertItem(0, testUrl);
|
||||||
QMovie *m(new QMovie(":/icons/indicator.gif"));
|
_internetWait->setPixmap(QPixmap(":/icons/indicator.gif"));
|
||||||
_internetWait->setMovie(m);
|
_internetWait->setMovie(new QMovie(":/icons/indicator.gif"));
|
||||||
m->start();
|
_internetWait->movie()->start();
|
||||||
QSettings s("SwissSign", "ProxySettings");
|
QSettings s("SwissSign", "ProxySettings");
|
||||||
|
_save->setChecked(s.contains("default-type"));
|
||||||
_type->setCurrentIndex(s.value("default-type", 0).toInt());
|
_type->setCurrentIndex(s.value("default-type", 0).toInt());
|
||||||
_url->setText(s.value("default-server", QString()).toString());
|
_url->setText(s.value("default-server", QString()).toString());
|
||||||
_port->setValue(s.value("default-port", 0).toInt());
|
_port->setValue(s.value("default-port", 0).toInt());
|
||||||
|
_lastDefaultProxy = QNetworkProxy();
|
||||||
|
_lastType = _type->currentIndex();
|
||||||
|
_lastUrl = _url->text();
|
||||||
|
_lastPort = _port->value();
|
||||||
connect(&_auto, SIGNAL(proxyFound(const QUrl&, const QNetworkProxy&)),
|
connect(&_auto, SIGNAL(proxyFound(const QUrl&, const QNetworkProxy&)),
|
||||||
SIGNAL(proxyFound(const QUrl&, const QNetworkProxy&)));
|
SIGNAL(proxyFound(const QUrl&, const QNetworkProxy&)));
|
||||||
connect(&_auto, SIGNAL(proxyFound(const QUrl&, const QNetworkProxy&)),
|
connect(&_auto, SIGNAL(proxyFound(const QUrl&, const QNetworkProxy&)),
|
||||||
@@ -50,6 +59,14 @@ namespace gui {
|
|||||||
QString, QString)),
|
QString, QString)),
|
||||||
SIGNAL(temporaryError(QNetworkReply::NetworkError,
|
SIGNAL(temporaryError(QNetworkReply::NetworkError,
|
||||||
QString, QString)));
|
QString, QString)));
|
||||||
|
connect(&_auto, SIGNAL(proxyAuthenticationRequired
|
||||||
|
(const QNetworkProxy&, QAuthenticator*)),
|
||||||
|
SLOT(proxyAuthenticationRequired(const QNetworkProxy&,
|
||||||
|
QAuthenticator*)));
|
||||||
|
connect(&_auto, SIGNAL(authenticationRequired
|
||||||
|
(const QNetworkProxy&, QAuthenticator*)),
|
||||||
|
SLOT(authenticationRequired(const QNetworkProxy&,
|
||||||
|
QAuthenticator*)));
|
||||||
acceptValues();
|
acceptValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,10 +82,18 @@ namespace gui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void retry() {
|
void retry() {
|
||||||
acceptValues(true);
|
on__test_clicked();
|
||||||
|
}
|
||||||
|
|
||||||
|
void reset() {
|
||||||
|
_type->setCurrentIndex(_lastType);
|
||||||
|
_url->setText(_lastUrl);
|
||||||
|
_port->setValue(_lastPort);
|
||||||
|
QNetworkProxy::setApplicationProxy(_lastDefaultProxy);
|
||||||
|
acceptValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
void acceptValues(bool retry=false) {
|
void acceptValues() {
|
||||||
on__test_clicked();
|
on__test_clicked();
|
||||||
switch (_type->currentIndex()) {
|
switch (_type->currentIndex()) {
|
||||||
case 0: try {
|
case 0: try {
|
||||||
@@ -91,10 +116,6 @@ namespace gui {
|
|||||||
_lastType = _type->currentIndex();
|
_lastType = _type->currentIndex();
|
||||||
_lastUrl = _url->text();
|
_lastUrl = _url->text();
|
||||||
_lastPort = _port->value();
|
_lastPort = _port->value();
|
||||||
if (!retry) {
|
|
||||||
_stackInternet->setCurrentIndex(WAITING_FOR_SERVER);
|
|
||||||
detecting();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
@@ -105,14 +126,40 @@ namespace gui {
|
|||||||
void temporaryError(QNetworkReply::NetworkError, QString, QString);
|
void temporaryError(QNetworkReply::NetworkError, QString, QString);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
|
|
||||||
|
void proxyAuthenticationRequired(const QNetworkProxy& p,
|
||||||
|
QAuthenticator* auth) {
|
||||||
|
static ProxyAuth proxyAuth(this);
|
||||||
|
proxyAuth._realm->setText(auth->realm());
|
||||||
|
_auto.pause();
|
||||||
|
qDebug()<<"---> proxyAuthenticationRequired";
|
||||||
|
if (proxyAuth.exec()==QDialog::Accepted) {
|
||||||
|
auth->setUser(proxyAuth._username->text());
|
||||||
|
auth->setPassword(proxyAuth._password->text());
|
||||||
|
qDebug()<<"Setting authentication to:"
|
||||||
|
<<auth->user()<<auth->password();
|
||||||
|
}
|
||||||
|
qDebug()<<"---> done: proxyAuthenticationRequired";
|
||||||
|
_auto.restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
void authenticationRequired(const QNetworkProxy& p,
|
||||||
|
QAuthenticator* auth) {
|
||||||
|
static ProxyAuth proxyAuth(this);
|
||||||
|
proxyAuth._realm->setText(auth->realm());
|
||||||
|
if (proxyAuth.exec()) {
|
||||||
|
auth->setUser(proxyAuth._username->text());
|
||||||
|
auth->setPassword(proxyAuth._password->text());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void proxyFoundSlot(const QUrl&, const QNetworkProxy& p) {
|
void proxyFoundSlot(const QUrl&, const QNetworkProxy& p) {
|
||||||
_stackInternet->setCurrentIndex(SERVER_FOUND);
|
_stackInternet->setCurrentIndex(SERVER_FOUND);
|
||||||
QNetworkProxy prx(p.type()==QNetworkProxy::DefaultProxy
|
QNetworkProxy prx(p.type()==QNetworkProxy::DefaultProxy
|
||||||
?QNetworkProxy::applicationProxy():p);
|
?QNetworkProxy::applicationProxy():p);
|
||||||
if (prx.type()==QNetworkProxy::DefaultProxy) return;
|
if (prx.type()==QNetworkProxy::DefaultProxy) return;
|
||||||
_url->setText(prx.hostName());
|
if (!_url->isEnabled()) _url->setText(prx.hostName());
|
||||||
_port->setValue(prx.port());
|
if (!_port->isEnabled()) _port->setValue(prx.port());
|
||||||
if (p.type()==QNetworkProxy::DefaultProxy) return;
|
if (p.type()==QNetworkProxy::DefaultProxy) return;
|
||||||
QNetworkProxy::setApplicationProxy(prx);
|
QNetworkProxy::setApplicationProxy(prx);
|
||||||
}
|
}
|
||||||
@@ -128,6 +175,8 @@ namespace gui {
|
|||||||
|
|
||||||
void on__test_clicked() {
|
void on__test_clicked() {
|
||||||
_auto.reset();
|
_auto.reset();
|
||||||
|
_stackInternet->setCurrentIndex(WAITING_FOR_SERVER);
|
||||||
|
detecting();
|
||||||
switch (_type->currentIndex()) {
|
switch (_type->currentIndex()) {
|
||||||
case 0: try {
|
case 0: try {
|
||||||
QNetworkProxy::setApplicationProxy
|
QNetworkProxy::setApplicationProxy
|
||||||
@@ -155,10 +204,7 @@ namespace gui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void reject() {
|
virtual void reject() {
|
||||||
_type->setCurrentIndex(_lastType);
|
reset();
|
||||||
_url->setText(_lastUrl);
|
|
||||||
_port->setValue(_lastPort);
|
|
||||||
QNetworkProxy::setApplicationProxy(_lastDefaultProxy);
|
|
||||||
QDialog::reject();
|
QDialog::reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,39 @@
|
|||||||
<translation type="obsolete">Entfernen</translation>
|
<translation type="obsolete">Entfernen</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ProxyAuth</name>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="14"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="106"/>
|
||||||
|
<source>Proxy Authentication</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="20"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="107"/>
|
||||||
|
<source>Please logon to:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="27"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="108"/>
|
||||||
|
<source>...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="36"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="109"/>
|
||||||
|
<source>Username:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="46"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="110"/>
|
||||||
|
<source>Password:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>gui::Proxy</name>
|
<name>gui::Proxy</name>
|
||||||
<message>
|
<message>
|
||||||
|
|||||||
@@ -150,6 +150,39 @@
|
|||||||
<translation type="obsolete">Remove</translation>
|
<translation type="obsolete">Remove</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ProxyAuth</name>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="14"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="106"/>
|
||||||
|
<source>Proxy Authentication</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="20"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="107"/>
|
||||||
|
<source>Please logon to:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="27"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="108"/>
|
||||||
|
<source>...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="36"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="109"/>
|
||||||
|
<source>Username:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="46"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="110"/>
|
||||||
|
<source>Password:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>gui::Proxy</name>
|
<name>gui::Proxy</name>
|
||||||
<message>
|
<message>
|
||||||
|
|||||||
@@ -150,6 +150,39 @@
|
|||||||
<translation type="obsolete">Enlever</translation>
|
<translation type="obsolete">Enlever</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ProxyAuth</name>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="14"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="106"/>
|
||||||
|
<source>Proxy Authentication</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="20"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="107"/>
|
||||||
|
<source>Please logon to:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="27"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="108"/>
|
||||||
|
<source>...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="36"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="109"/>
|
||||||
|
<source>Username:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="46"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="110"/>
|
||||||
|
<source>Password:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>gui::Proxy</name>
|
<name>gui::Proxy</name>
|
||||||
<message>
|
<message>
|
||||||
|
|||||||
@@ -150,6 +150,39 @@
|
|||||||
<translation type="obsolete">Eliminazione</translation>
|
<translation type="obsolete">Eliminazione</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ProxyAuth</name>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="14"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="106"/>
|
||||||
|
<source>Proxy Authentication</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="20"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="107"/>
|
||||||
|
<source>Please logon to:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="27"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="108"/>
|
||||||
|
<source>...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="36"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="109"/>
|
||||||
|
<source>Username:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="proxyauth.ui" line="46"/>
|
||||||
|
<location filename="ui_proxyauth.hxx" line="110"/>
|
||||||
|
<source>Password:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>gui::Proxy</name>
|
<name>gui::Proxy</name>
|
||||||
<message>
|
<message>
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ namespace proxy {
|
|||||||
|
|
||||||
//! Implemented using Qt System Proxy
|
//! Implemented using Qt System Proxy
|
||||||
virtual List proxies(const std::string& url) {
|
virtual List proxies(const std::string& url) {
|
||||||
|
|
||||||
|
qDebug()<<"************ QTPROXY ********************";
|
||||||
|
qDebug()<<"************ QTPROXY ********************";
|
||||||
|
|
||||||
List res;
|
List res;
|
||||||
|
|
||||||
@@ -45,6 +48,8 @@ namespace proxy {
|
|||||||
case QNetworkProxy::FtpCachingProxy:
|
case QNetworkProxy::FtpCachingProxy:
|
||||||
type=HTTP;
|
type=HTTP;
|
||||||
}
|
}
|
||||||
|
qDebug()<<QString("************ QTPROXY: %1:%2")
|
||||||
|
.arg(proxy->hostName()).arg(proxy->port());
|
||||||
res.push_back
|
res.push_back
|
||||||
(Proxy(type, proxy->hostName().toStdString(), proxy->port()));
|
(Proxy(type, proxy->hostName().toStdString(), proxy->port()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user