1) Fixed compilation issue with QT4.
2) Make trigger action 'RequestClose' backword compatible with annulen webkit.pull/5/merge
parent
cbf2de6c27
commit
3ed00d3be7
|
@ -835,9 +835,16 @@ void BrowserWindow::closetabs()
|
|||
webviewPtr = dynamic_cast<WebViewWindow*>(widgetPtr);
|
||||
if (webviewPtr != NULL)
|
||||
{
|
||||
// Trigger the action for tab window close so unload event
|
||||
// will be called and resources will be freed properly.
|
||||
webviewPtr->page()->triggerAction(QWebPage::RequestClose);
|
||||
/* Trigger the action for tab window close so unload event will be called and
|
||||
* resources will be freed properly.
|
||||
* Trigger 'RequestClose' action from Qt5 onwards. Here we have triggerred the action
|
||||
* 'ToggleVideoFullscreen + 1' because we do not know from which webkit
|
||||
* version 'RequestClose' action was added so increment with previous enum value so that
|
||||
* it will be backward webkit version compatible.
|
||||
*/
|
||||
#if QT_VERSION >= 0x050000
|
||||
webviewPtr->page()->triggerAction(static_cast<QWebPage::WebAction>(QWebPage::ToggleVideoFullscreen + 1));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include <QtWebEngineView>
|
||||
#else
|
||||
#include <QWebView>
|
||||
#include <QNetworkCookieJar>
|
||||
#include <QNetworkAccessManager>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue