Skip to content

Commit

Permalink
add QWebEngineSettings::UnknownUrlSchemePolicy to qwebenginesettings
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Mar 14, 2022
1 parent 3a50805 commit 61fb102
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions articleview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ ArticleView::ArticleView( QWidget * parent, ArticleNetworkAccessManager & nm, Au
ui.ftsSearchFrame->installEventFilter( this );

QWebEngineSettings * settings = ui.definition->settings();
settings->setUnknownUrlSchemePolicy(QWebEngineSettings::UnknownUrlSchemePolicy::DisallowUnknownUrlSchemes);
#if( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
settings->defaultSettings()->setAttribute( QWebEngineSettings::WebAttribute::LocalContentCanAccessRemoteUrls, true );
settings->defaultSettings()->setAttribute( QWebEngineSettings::WebAttribute::LocalContentCanAccessFileUrls, true );
Expand Down

0 comments on commit 61fb102

Please sign in to comment.