From ea39cc542e17ce592dc3c4f2053d534bc458d88e Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Sat, 30 May 2020 19:33:47 +0200 Subject: More usability, survives conmans torture nearly with 100% --- geminiwebpage.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'geminiwebpage.hpp') diff --git a/geminiwebpage.hpp b/geminiwebpage.hpp index 94c6a82..a5de627 100644 --- a/geminiwebpage.hpp +++ b/geminiwebpage.hpp @@ -3,20 +3,25 @@ #include #include +#include "mainwindow.hpp" class GeminiWebPage : public QWebEnginePage { Q_OBJECT public: - explicit GeminiWebPage(QObject *parent = nullptr); + explicit GeminiWebPage(MainWindow * container); signals: void navigationRequest(QUrl const & url, bool & allow); protected: - bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame); + bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) override; + QWebEnginePage *createWindow(QWebEnginePage::WebWindowType type) override; + +private: + MainWindow * main_window; }; #endif // GEMINIWEBPAGE_HPP -- cgit v1.2.3