goldendict-ng/gico_schemahandler.cpp
2021-08-28 10:35:23 +08:00

18 lines
491 B
C++

#include "gico_schemahandler.h"
GicoSchemeHandler::GicoSchemeHandler(ArticleNetworkAccessManager& articleNetMgr):mManager(articleNetMgr){
}
void GicoSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob)
{
QUrl url = requestJob->requestUrl();
QNetworkRequest request;
request.setUrl( url );
QNetworkReply* reply=this->mManager.createRequest(QNetworkAccessManager::GetOperation,request,NULL);
// Reply segment
requestJob->reply("image/png", reply);
}