Tunnel a few features until we have a proper API

This commit is contained in:
Florian Bruhin 2016-07-05 11:14:25 +02:00
parent 3c71337698
commit edafa7c99f

View File

@ -486,7 +486,8 @@ class CommandDispatcher:
url = self._current_url().adjusted(QUrl.RemoveFragment) url = self._current_url().adjusted(QUrl.RemoveFragment)
if where in ['prev', 'next']: if where in ['prev', 'next']:
frame = widget._widget.page().currentFrame() # FIXME # FIXME:refactor have a proper API for this
frame = widget._widget.page().currentFrame()
if frame is None: if frame is None:
raise cmdexc.CommandError("No frame focused!") raise cmdexc.CommandError("No frame focused!")
else: else:
@ -1136,6 +1137,7 @@ class CommandDispatcher:
"Please enable developer-extras before using the " "Please enable developer-extras before using the "
"webinspector!") "webinspector!")
tab.data.inspector = inspector.WebInspector() tab.data.inspector = inspector.WebInspector()
# FIXME:refactor have a proper API for this
tab.data.inspector.setPage(tab._widget.page()) tab.data.inspector.setPage(tab._widget.page())
tab.data.inspector.show() tab.data.inspector.show()
elif tab.data.inspector.isVisible(): elif tab.data.inspector.isVisible():
@ -1184,7 +1186,8 @@ class CommandDispatcher:
if mhtml_: if mhtml_:
self._download_mhtml(dest) self._download_mhtml(dest)
else: else:
page = self._current_widget().page() # FIXME:refactor have a proper API for this
page = self._current_widget()._widget.page()
download_manager.get(self._current_url(), page=page, download_manager.get(self._current_url(), page=page,
filename=dest) filename=dest)
@ -1326,7 +1329,8 @@ class CommandDispatcher:
The editor which should be launched can be configured via the The editor which should be launched can be configured via the
`general -> editor` config option. `general -> editor` config option.
""" """
frame = self._current_widget().page().currentFrame() # FIXME:refactor have a proper API for this
frame = self._current_widget()._widget.page().currentFrame()
try: try:
elem = webelem.focus_elem(frame) elem = webelem.focus_elem(frame)
except webelem.IsNullError: except webelem.IsNullError: