Snippets: acceptNavigationRequest: only process NavigationTypeLinkClicked events
This commit is contained in:
parent
eb53b598d6
commit
7987819415
@ -74,10 +74,14 @@ public:
|
||||
: QWebEnginePage((QWidget *)parent), m_parent(parent) {}
|
||||
protected:
|
||||
virtual bool acceptNavigationRequest(const QUrl& url,
|
||||
NavigationType,
|
||||
NavigationType tp,
|
||||
bool) {
|
||||
m_parent->onLinkClicked(url);
|
||||
return false;
|
||||
if (tp == QWebEnginePage::NavigationTypeLinkClicked) {
|
||||
m_parent->onLinkClicked(url);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
private:
|
||||
SnippetsW *m_parent;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user