diff --git a/src/core/silentnetworkaccessmanager.cpp b/src/core/silentnetworkaccessmanager.cpp index bb5540e63..750c792f2 100644 --- a/src/core/silentnetworkaccessmanager.cpp +++ b/src/core/silentnetworkaccessmanager.cpp @@ -1,10 +1,29 @@ #include "core/silentnetworkaccessmanager.h" +#include + SilentNetworkAccessManager::SilentNetworkAccessManager(QObject *parent) : BaseNetworkAccessManager(parent) { + } SilentNetworkAccessManager::~SilentNetworkAccessManager() { qDebug("Destroying SilentNetworkAccessManages instance."); } + +void SilentNetworkAccessManager::onSslErrors(QNetworkReply *reply, + const QList &error) { + qDebug("SSL errors for '%s'.", + qPrintable(reply->url().toString())); + + reply->ignoreSslErrors(error); +} + +void SilentNetworkAccessManager::onAuthenticationRequired(QNetworkReply *reply, + QAuthenticator *authenticator) { + Q_UNUSED(authenticator) + + qDebug("Authentification problems for '%s'.", + qPrintable(reply->url().toString())); +} diff --git a/src/core/silentnetworkaccessmanager.h b/src/core/silentnetworkaccessmanager.h index 3eac9b4b8..e27125b0a 100644 --- a/src/core/silentnetworkaccessmanager.h +++ b/src/core/silentnetworkaccessmanager.h @@ -12,6 +12,11 @@ class SilentNetworkAccessManager : public BaseNetworkAccessManager { // Constructors and destructors. explicit SilentNetworkAccessManager(QObject *parent = 0); virtual ~SilentNetworkAccessManager(); + + protected slots: + void onSslErrors(QNetworkReply *reply, const QList &error); + void onAuthenticationRequired(QNetworkReply * reply, QAuthenticator *authenticator); + }; #endif // SILENTNETWORKACCESSMANAGES_H