mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixes #2328
1) Fixed issue of opening Query Tool and Debugger in new Tab with QT 5.8 and annulen webkit 2) Moved unload event of window from javascript files to html. 3) Change alertify messages for debugger. 4) Closed all connections created by debugger. Previously only one connection has been closed.
This commit is contained in:
@@ -14,6 +14,11 @@
|
||||
// App headers
|
||||
#include "WebViewWindow.h"
|
||||
|
||||
#ifndef PGADMIN4_USE_WEBENGINE
|
||||
#include <QWebPage>
|
||||
#include <QNetworkRequest>
|
||||
#endif
|
||||
|
||||
// Override QWebEnginePage to handle link delegation
|
||||
#ifdef PGADMIN4_USE_WEBENGINE
|
||||
bool WebEnginePage::acceptNavigationRequest(const QUrl & url, NavigationType type, bool isMainFrame)
|
||||
@@ -67,3 +72,42 @@ int WebViewWindow::getTabIndex() const
|
||||
{
|
||||
return m_tabIndex;
|
||||
}
|
||||
|
||||
#ifndef PGADMIN4_USE_WEBENGINE
|
||||
WebViewPage::WebViewPage(QObject *parent)
|
||||
: QWebPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
bool WebViewPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type)
|
||||
{
|
||||
Q_UNUSED(type);
|
||||
Q_UNUSED(request);
|
||||
Q_UNUSED(frame);
|
||||
return true;
|
||||
}
|
||||
|
||||
QWebPage *WebViewPage::createWindow(QWebPage::WebWindowType type)
|
||||
{
|
||||
if (type == QWebPage::WebBrowserWindow)
|
||||
{
|
||||
QWebPage *_page = NULL;
|
||||
emit createTabWindowKit(_page);
|
||||
return _page;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool WebViewPage::javaScriptConfirm(QWebFrame * frame, const QString & msg)
|
||||
{
|
||||
// If required, override the QDialog to give custom confirmation message to user.
|
||||
Q_UNUSED(frame);
|
||||
Q_UNUSED(msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
WebViewPage::~WebViewPage()
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user