mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
fix: in qt6.3 the devtools have a function called "Switch devtools to chinese" if the current system language is Chinese.
when click the button ,the actual request devtools:// was blocked by WebUrlRequestInterceptor
This commit is contained in:
parent
ac7a70cea1
commit
43b2006d72
|
@ -9,7 +9,12 @@ WebUrlRequestInterceptor::WebUrlRequestInterceptor(QObject *p)
|
|||
}
|
||||
void WebUrlRequestInterceptor::interceptRequest( QWebEngineUrlRequestInfo &info) {
|
||||
if (QWebEngineUrlRequestInfo::NavigationTypeLink == info.navigationType() && info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeMainFrame) {
|
||||
emit linkClicked(info.requestUrl());
|
||||
//workaround to fix devtool "Switch devtool to chinese" interface was blocked.
|
||||
if( info.requestUrl().scheme() == "devtools" )
|
||||
{
|
||||
return;
|
||||
}
|
||||
emit linkClicked( info.requestUrl() );
|
||||
info.block(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue