Wiki's: Ignore SSL connection errors

This commit is contained in:
Abs62 2015-02-20 17:18:03 +03:00
parent 3995717cdd
commit 20396aa988

View file

@ -131,6 +131,13 @@ MediaWikiWordSearchRequest::MediaWikiWordSearchRequest( wstring const & str,
connect( netReply.get(), SIGNAL( finished() ), connect( netReply.get(), SIGNAL( finished() ),
this, SLOT( downloadFinished() ) ); 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 // We start a timer to postpone early destruction, so a rapid type won't make
// unnecessary network load // unnecessary network load
startTimer( 200 ); startTimer( 200 );
@ -262,6 +269,13 @@ void MediaWikiArticleRequest::addQuery( QNetworkAccessManager & mgr,
sptr< QNetworkReply > netReply = mgr.get( QNetworkRequest( reqUrl ) ); 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 ) ); netReplies.push_back( std::make_pair( netReply, false ) );
} }