Use QtWebEngine with Qt5.5+ instead of QtWebKit. Fixes #1375, fixes #1641,

fixes #1916, fixes #1815, fixes #1332
This commit is contained in:
Neel Patel
2016-11-08 10:54:34 +00:00
committed by Dave Page
parent 7da3ece169
commit 6e5683064e
6 changed files with 341 additions and 4 deletions

View File

@@ -15,12 +15,34 @@
#include "pgAdmin4.h"
#if QT_VERSION >= 0x050000
#if QT_VERSION >= 0x050500
#include <QtWebEngineWidgets>
#else
#include <QtWebKitWidgets>
#endif
#else
#include <QWebView>
#endif
// Override QWebEnginePage to handle link delegation
#if QT_VERSION >= 0x050500
class WebEnginePage : public QWebEnginePage
{
Q_OBJECT
protected:
virtual bool acceptNavigationRequest(const QUrl & url, NavigationType type, bool isMainFrame);
QWebEnginePage *createWindow(QWebEnginePage::WebWindowType type);
signals:
void createTabWindow(QWebEnginePage * &);
};
#endif
#if QT_VERSION >= 0x050500
class WebViewWindow : public QWebEngineView
#else
class WebViewWindow : public QWebView
#endif
{
Q_OBJECT
public: