Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2013-05-31 18:16:56 +0400
committerDaniel Molkentin <danimo@owncloud.com>2013-05-31 18:16:56 +0400
commita9aab30d557b85d12d3d7cb0c91b28f61c56269d (patch)
treeb222bce87d42db3f1d9b940eee294021ffdad24c
parentefbad3a3c8a1906ddafcf7bc7666a9f657942b9b (diff)
Display proxy errors
-rw-r--r--src/mirall/owncloudinfo.cpp35
-rw-r--r--src/mirall/owncloudinfo.h2
2 files changed, 34 insertions, 3 deletions
diff --git a/src/mirall/owncloudinfo.cpp b/src/mirall/owncloudinfo.cpp
index b691152cc..35e4e8d4f 100644
--- a/src/mirall/owncloudinfo.cpp
+++ b/src/mirall/owncloudinfo.cpp
@@ -16,6 +16,7 @@
#include "mirall/mirallconfigfile.h"
#include "mirall/theme.h"
#include "mirall/utility.h"
+#include "mirall/logger.h"
#include <QtCore>
#include <QtGui>
@@ -64,7 +65,8 @@ ownCloudInfo::ownCloudInfo() :
_manager(0)
{
_connection = Theme::instance()->appName();
-
+ connect(this, SIGNAL(guiLog(QString,QString)),
+ Logger::instance(), SIGNAL(guiLog(QString,QString)));
setNetworkAccessManager( new QNetworkAccessManager( this ) );
}
@@ -481,7 +483,36 @@ bool ownCloudInfo::certsUntrusted()
void ownCloudInfo::slotError( QNetworkReply::NetworkError err)
{
- qDebug() << "ownCloudInfo Network Error: " << err;
+ qDebug() << "ownCloudInfo Network Error: " << err;
+
+ switch (err) {
+ case QNetworkReply::ProxyConnectionRefusedError:
+ emit guiLog(tr("Proxy Refused Connection "),
+ tr("The configured proxy has refused the connection. "
+ "Please check the proxy settings."));
+ break;
+ case QNetworkReply::ProxyConnectionClosedError:
+ emit guiLog(tr("Proxy Closed Connection"),
+ tr("The configured proxy has closed the connection. "
+ "Please check the proxy settings."));
+ break;
+ case QNetworkReply::ProxyNotFoundError:
+ emit guiLog(tr("Proxy Not Found"),
+ tr("The configured proxy could not be found. "
+ "Please check the proxy settings."));
+ break;
+ case QNetworkReply::ProxyAuthenticationRequiredError:
+ emit guiLog(tr("Proxy Authentication Error"),
+ tr("The configured proxy requires login but the proxy credentials "
+ "are invalid. Please check the proxy settings."));
+ break;
+ case QNetworkReply::ProxyTimeoutError:
+ emit guiLog(tr("Proxy Connection Timed Out"),
+ tr("The connection to the configured proxy has timed out."));
+ break;
+ default:
+ break;
+ }
}
void ownCloudInfo::setCredentials( const QString& user, const QString& passwd,
diff --git a/src/mirall/owncloudinfo.h b/src/mirall/owncloudinfo.h
index 10cb934fc..3f4f9c26a 100644
--- a/src/mirall/owncloudinfo.h
+++ b/src/mirall/owncloudinfo.h
@@ -118,7 +118,7 @@ signals:
void webdavColCreated( QNetworkReply::NetworkError );
void sslFailed( QNetworkReply *reply, QList<QSslError> errors );
-
+ void guiLog( const QString& title, const QString& content );
public slots:
protected slots: