mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
e6ab87ca73
due to iframe security policy and x-frame-option . the website online dictionary can not work in qt 5.15.2+ version. this is a workaround to pass through the restriction.
20 lines
379 B
C++
20 lines
379 B
C++
#ifndef IFRAMESCHEMEHANDLER_H
|
|
#define IFRAMESCHEMEHANDLER_H
|
|
|
|
#include"article_netmgr.hh"
|
|
|
|
class IframeSchemeHandler : public QWebEngineUrlSchemeHandler
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
IframeSchemeHandler(QObject * parent=nullptr);
|
|
void requestStarted(QWebEngineUrlRequestJob *requestJob);
|
|
|
|
protected:
|
|
|
|
private:
|
|
QNetworkAccessManager mgr;
|
|
};
|
|
|
|
#endif // IFRAMESCHEMEHANDLER_H
|