Skip to content

Commit

Permalink
Merge pull request #9176 from tudorbarascu/allow_localstorage
Browse files Browse the repository at this point in the history
Enable HTML5 local storage for qgsexternalresourcewidget and maptips
  • Loading branch information
luipir committed Feb 15, 2019
2 parents 71bdc31 + 65a54fe commit 7980cef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gui/qgsexternalresourcewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ void QgsExternalResourceWidget::loadDocument( const QString &path )
if ( mDocumentViewerContent == Web )
{
mWebView->setUrl( QUrl::fromEncoded( resolvedPath.toUtf8() ) );
mWebView->page()->settings()->setAttribute( QWebSettings::LocalStorageEnabled, true );
}
#endif

Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsmaptip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer,

mWebView->page()->settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
mWebView->page()->settings()->setAttribute( QWebSettings::JavascriptEnabled, true );
mWebView->page()->settings()->setAttribute( QWebSettings::LocalStorageEnabled, true );

// Disable scrollbars, avoid random resizing issues
mWebView->page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff );
Expand Down

0 comments on commit 7980cef

Please sign in to comment.