Silented errors for nam for feed fetching.
This commit is contained in:
parent
af56fbcf1a
commit
a49df4f2cf
@ -1,10 +1,29 @@
|
|||||||
#include "core/silentnetworkaccessmanager.h"
|
#include "core/silentnetworkaccessmanager.h"
|
||||||
|
|
||||||
|
#include <QNetworkReply>
|
||||||
|
|
||||||
|
|
||||||
SilentNetworkAccessManager::SilentNetworkAccessManager(QObject *parent)
|
SilentNetworkAccessManager::SilentNetworkAccessManager(QObject *parent)
|
||||||
: BaseNetworkAccessManager(parent) {
|
: BaseNetworkAccessManager(parent) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SilentNetworkAccessManager::~SilentNetworkAccessManager() {
|
SilentNetworkAccessManager::~SilentNetworkAccessManager() {
|
||||||
qDebug("Destroying SilentNetworkAccessManages instance.");
|
qDebug("Destroying SilentNetworkAccessManages instance.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SilentNetworkAccessManager::onSslErrors(QNetworkReply *reply,
|
||||||
|
const QList<QSslError> &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()));
|
||||||
|
}
|
||||||
|
@ -12,6 +12,11 @@ class SilentNetworkAccessManager : public BaseNetworkAccessManager {
|
|||||||
// Constructors and destructors.
|
// Constructors and destructors.
|
||||||
explicit SilentNetworkAccessManager(QObject *parent = 0);
|
explicit SilentNetworkAccessManager(QObject *parent = 0);
|
||||||
virtual ~SilentNetworkAccessManager();
|
virtual ~SilentNetworkAccessManager();
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
void onSslErrors(QNetworkReply *reply, const QList<QSslError> &error);
|
||||||
|
void onAuthenticationRequired(QNetworkReply * reply, QAuthenticator *authenticator);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SILENTNETWORKACCESSMANAGES_H
|
#endif // SILENTNETWORKACCESSMANAGES_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user