Skip to content

Commit

Permalink
Get proper settings object in WebEngineElement._click_js
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Jun 6, 2017
1 parent a7413d7 commit f9b046d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qutebrowser/browser/webengine/webengineelem.py
Expand Up @@ -199,7 +199,10 @@ def _click_editable(self, click_target):
self._move_text_cursor() self._move_text_cursor()


def _click_js(self, _click_target): def _click_js(self, _click_target):
settings = QWebEngineSettings.globalSettings() # FIXME:qtwebengine Have a proper API for this
# pylint: disable=protected-access
settings = self._tab._widget.settings()
# pylint: enable=protected-access
attribute = QWebEngineSettings.JavascriptCanOpenWindows attribute = QWebEngineSettings.JavascriptCanOpenWindows
could_open_windows = settings.testAttribute(attribute) could_open_windows = settings.testAttribute(attribute)
settings.setAttribute(attribute, True) settings.setAttribute(attribute, True)
Expand Down

0 comments on commit f9b046d

Please sign in to comment.