From 20396aa988c882fd858d8039e6a11caf0e6c6708 Mon Sep 17 00:00:00 2001 From: Abs62 Date: Fri, 20 Feb 2015 17:18:03 +0300 Subject: [PATCH] Wiki's: Ignore SSL connection errors --- mediawiki.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mediawiki.cc b/mediawiki.cc index 9fa21022..544a11da 100644 --- a/mediawiki.cc +++ b/mediawiki.cc @@ -131,6 +131,13 @@ MediaWikiWordSearchRequest::MediaWikiWordSearchRequest( wstring const & str, connect( netReply.get(), SIGNAL( finished() ), this, SLOT( downloadFinished() ) ); +#ifndef QT_NO_OPENSSL + + connect( netReply.get(), SIGNAL( sslErrors( QList< QSslError > ) ), + netReply.get(), SLOT( ignoreSslErrors() ) ); + +#endif + // We start a timer to postpone early destruction, so a rapid type won't make // unnecessary network load startTimer( 200 ); @@ -262,6 +269,13 @@ void MediaWikiArticleRequest::addQuery( QNetworkAccessManager & mgr, sptr< QNetworkReply > netReply = mgr.get( QNetworkRequest( reqUrl ) ); +#ifndef QT_NO_OPENSSL + + connect( netReply.get(), SIGNAL( sslErrors( QList< QSslError > ) ), + netReply.get(), SLOT( ignoreSslErrors() ) ); + +#endif + netReplies.push_back( std::make_pair( netReply, false ) ); }