mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-25 01:14:07 +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
|