mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
14 lines
442 B
C++
14 lines
442 B
C++
#include "weburlrequestinterceptor.h"
|
|
#include <QDebug>
|
|
|
|
WebUrlRequestInterceptor::WebUrlRequestInterceptor(QObject *p)
|
|
:QWebEngineUrlRequestInterceptor(p)
|
|
{
|
|
|
|
}
|
|
void WebUrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) {
|
|
if(QWebEngineUrlRequestInfo::NavigationTypeLink==info.navigationType ()&&info.resourceType ()==QWebEngineUrlRequestInfo::ResourceTypeMainFrame)
|
|
emit linkClicked(info.requestUrl ());
|
|
|
|
}
|