Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Enable plugins (eg. to show PDFs) in webview widgets used on feature …
…info in identify or in forms
  • Loading branch information
jef-n committed Sep 14, 2016
1 parent 2d0932d commit a54bfc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgsidentifyresultsdialog.cpp
Expand Up @@ -70,6 +70,7 @@ QgsIdentifyResultsWebView::QgsIdentifyResultsWebView( QWidget *parent ) : QgsWeb
page()->setLinkDelegationPolicy( QWebPage::DontDelegateLinks );
settings()->setAttribute( QWebSettings::LocalContentCanAccessRemoteUrls, true );
settings()->setAttribute( QWebSettings::JavascriptCanOpenWindows, true );
settings()->setAttribute( QWebSettings::PluginsEnabled, true );
#ifdef QGISDEBUG
settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
#endif
Expand Down Expand Up @@ -110,6 +111,7 @@ QgsWebView *QgsIdentifyResultsWebView::createWindow( QWebPage::WebWindowType typ
wv->page()->setNetworkAccessManager( QgsNetworkAccessManager::instance() );
wv->settings()->setAttribute( QWebSettings::LocalContentCanAccessRemoteUrls, true );
wv->settings()->setAttribute( QWebSettings::JavascriptCanOpenWindows, true );
settings()->setAttribute( QWebSettings::PluginsEnabled, true );
#ifdef QGISDEBUG
wv->settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
#endif
Expand Down
1 change: 1 addition & 0 deletions src/gui/editorwidgets/qgswebviewwidgetwrapper.cpp
Expand Up @@ -125,6 +125,7 @@ void QgsWebViewWidgetWrapper::initWidget( QWidget* editor )
mWebView->page()->setNetworkAccessManager( QgsNetworkAccessManager::instance() );
mWebView->settings()->setAttribute( QWebSettings::LocalContentCanAccessRemoteUrls, true );
mWebView->settings()->setAttribute( QWebSettings::JavascriptCanOpenWindows, true );
mWebView->settings()->setAttribute( QWebSettings::PluginsEnabled, true );
#ifdef QGISDEBUG
mWebView->settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
#endif
Expand Down

0 comments on commit a54bfc2

Please sign in to comment.