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) {}
|
: QWebEnginePage((QWidget *)parent), m_parent(parent) {}
|
||||||
protected:
|
protected:
|
||||||
virtual bool acceptNavigationRequest(const QUrl& url,
|
virtual bool acceptNavigationRequest(const QUrl& url,
|
||||||
NavigationType,
|
NavigationType tp,
|
||||||
bool) {
|
bool) {
|
||||||
m_parent->onLinkClicked(url);
|
if (tp == QWebEnginePage::NavigationTypeLinkClicked) {
|
||||||
return false;
|
m_parent->onLinkClicked(url);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
SnippetsW *m_parent;
|
SnippetsW *m_parent;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user