Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Ignore SSL errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic authored and halogenandtoast committed Oct 14, 2011
1 parent 3eb366e commit 053010a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/WebPage.cpp
Expand Up @@ -27,6 +27,7 @@ void WebPage::setCustomNetworkAccessManager() {
manager->setCookieJar(new NetworkCookieJar());
this->setNetworkAccessManager(manager);
connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(replyFinished(QNetworkReply *)));
connect(manager, SIGNAL(sslErrors(QNetworkReply *, QList<QSslError> &)), this, SLOT(ignoreSslErrors(QNetworkReply *, QList<QSslError> &)));
}

void WebPage::loadJavascript() {
Expand Down Expand Up @@ -192,6 +193,10 @@ void WebPage::replyFinished(QNetworkReply *reply) {
}
}

void WebPage::ignoreSslErrors(QNetworkReply *reply, QList<QSslError> &errors) {
reply->ignoreSslErrors(errors);
}

int WebPage::getLastStatus() {
return m_lastStatus;
}
Expand Down
1 change: 1 addition & 0 deletions src/WebPage.h
Expand Up @@ -25,6 +25,7 @@ class WebPage : public QWebPage {
QString pageHeaders();
void frameCreated(QWebFrame *);
void replyFinished(QNetworkReply *reply);
void ignoreSslErrors(QNetworkReply *reply, QList<QSslError> &);
void handleUnsupportedContent(QNetworkReply *reply);

signals:
Expand Down

0 comments on commit 053010a

Please sign in to comment.