mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
add QWebEngineSettings::UnknownUrlSchemePolicy to qwebenginesettings
This commit is contained in:
parent
3a50805cea
commit
61fb1020b8
|
@ -336,6 +336,7 @@ ArticleView::ArticleView( QWidget * parent, ArticleNetworkAccessManager & nm, Au
|
||||||
ui.ftsSearchFrame->installEventFilter( this );
|
ui.ftsSearchFrame->installEventFilter( this );
|
||||||
|
|
||||||
QWebEngineSettings * settings = ui.definition->settings();
|
QWebEngineSettings * settings = ui.definition->settings();
|
||||||
|
settings->setUnknownUrlSchemePolicy(QWebEngineSettings::UnknownUrlSchemePolicy::DisallowUnknownUrlSchemes);
|
||||||
#if( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
|
#if( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
|
||||||
settings->defaultSettings()->setAttribute( QWebEngineSettings::WebAttribute::LocalContentCanAccessRemoteUrls, true );
|
settings->defaultSettings()->setAttribute( QWebEngineSettings::WebAttribute::LocalContentCanAccessRemoteUrls, true );
|
||||||
settings->defaultSettings()->setAttribute( QWebEngineSettings::WebAttribute::LocalContentCanAccessFileUrls, true );
|
settings->defaultSettings()->setAttribute( QWebEngineSettings::WebAttribute::LocalContentCanAccessFileUrls, true );
|
||||||
|
|
Loading…
Reference in a new issue