mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-29 15:48:38 -05:00
35 lines
749 B
C++
35 lines
749 B
C++
#ifndef NETWORK_ACCESS_MANAGER_HPP__
|
|
#define NETWORK_ACCESS_MANAGER_HPP__
|
|
|
|
#include <QNetworkAccessManager>
|
|
#include <QList>
|
|
#include <QSslError>
|
|
|
|
#include "widgets/MessageBox.hpp"
|
|
|
|
class QNetworkRequest;
|
|
class QIODevice;
|
|
class QWidget;
|
|
|
|
// sub-class QNAM to keep a list of accepted SSL errors and allow
|
|
// them in future replies
|
|
class NetworkAccessManager
|
|
: public QNetworkAccessManager
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit NetworkAccessManager (QWidget * parent);
|
|
|
|
protected:
|
|
QNetworkReply * createRequest (Operation, QNetworkRequest const&, QIODevice * = nullptr) override;
|
|
|
|
private:
|
|
void filter_SSL_errors (QNetworkReply * reply, QList<QSslError> const& errors);
|
|
|
|
QWidget * parent_widget_;
|
|
QList<QSslError> allowed_ssl_errors_;
|
|
};
|
|
|
|
#endif
|