mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Merge pull request #948 from xiaoyifang/fix/website-qt5
fix: qt5 website output response as text/plain
This commit is contained in:
commit
82f0f841eb
|
@ -92,7 +92,15 @@ void IframeSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob)
|
||||||
|
|
||||||
buffer->setData(articleString.toUtf8());
|
buffer->setData(articleString.toUtf8());
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||||
requestJob->reply( "text/html; charset=utf-8", buffer );
|
requestJob->reply( "text/html; charset=utf-8", buffer );
|
||||||
|
#else
|
||||||
|
#if defined( Q_OS_WIN32 ) || defined( Q_OS_MAC )
|
||||||
|
requestJob->reply( contentType, buffer );
|
||||||
|
#else
|
||||||
|
requestJob->reply( "text/html", buffer );
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
connect( reply, &QNetworkReply::finished, requestJob, finishAction );
|
connect( reply, &QNetworkReply::finished, requestJob, finishAction );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue