Use provided methods instead of protected members

This commit is contained in:
George Edward Bulmer 2018-02-06 18:25:15 +00:00
parent 0893e3a038
commit 9c47128799
2 changed files with 3 additions and 3 deletions

View File

@ -806,7 +806,7 @@ class AbstractTab(QWidget):
raise NotImplementedError raise NotImplementedError
def dump_async(self, callback, *, plain=False): def dump_async(self, callback, *, plain=False):
"""Dump the current page to a file ascync. """Dump the current page's html asynchronously.
The given callback will be called with the result when dumping is The given callback will be called with the result when dumping is
complete. complete.

View File

@ -1515,10 +1515,10 @@ class CommandDispatcher:
return return
if current_url.scheme() == 'view-source': if current_url.scheme() == 'view-source':
raise cmdexc.CommandError("Already viewing source!") raise cmdexc.CommandError("Already viewing source!")
if edit: if edit:
ed = editor.ExternalEditor(self._tabbed_browser) ed = editor.ExternalEditor(self._tabbed_browser)
tab.dump_async(ed.edit)
tab._widget.page().toHtml(ed.edit)
else: else:
tab.action.show_source() tab.action.show_source()