opt: wikipedia word list optimization

This commit is contained in:
YiFang Xiao 2023-10-16 14:19:51 +08:00
parent 919e948ac7
commit bdf5fed904

View file

@ -137,7 +137,10 @@ MediaWikiWordSearchRequest::MediaWikiWordSearchRequest( wstring const & str,
Utils::Url::addQueryItem( reqUrl, "apprefix", QString::fromStdU32String( str ).replace( '+', "%2B" ) ); Utils::Url::addQueryItem( reqUrl, "apprefix", QString::fromStdU32String( str ).replace( '+', "%2B" ) );
netReply = std::shared_ptr< QNetworkReply >( mgr.get( QNetworkRequest( reqUrl ) ) ); QNetworkRequest req( reqUrl );
//millseconds.
req.setTransferTimeout( 2000 );
netReply = std::shared_ptr< QNetworkReply >( mgr.get( req ) );
connect( netReply.get(), SIGNAL( finished() ), this, SLOT( downloadFinished() ) ); connect( netReply.get(), SIGNAL( finished() ), this, SLOT( downloadFinished() ) );