Permalink
Browse files

Ignore SSL errors.

  • Loading branch information...
1 parent 3eb366e commit 053010a3a4c476f52b13084f29ba054ed234aeac @rectalogic rectalogic committed with halogenandtoast Sep 27, 2011
Showing with 6 additions and 0 deletions.
  1. +5 −0 src/WebPage.cpp
  2. +1 −0 src/WebPage.h
View
@@ -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() {
@@ -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;
}
View
@@ -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:

0 comments on commit 053010a

Please sign in to comment.