fixup! Switch browsing history away from QWebHistoryInterface.
This commit is contained in:
parent
33fbe97863
commit
b48b36a88d
@ -173,7 +173,11 @@ class WebHistory(QWebHistoryInterface):
|
||||
self._lineparser.save()
|
||||
self._saved_count = len(self._new_history)
|
||||
|
||||
def addHistoryEntry(self, url_string, title=""):
|
||||
def addHistoryEntry(self, url_string):
|
||||
"""Required for a QWebHistoryInterface impl, obseleted by add_url."""
|
||||
pass
|
||||
|
||||
def add_url(self, url_string, title=""):
|
||||
"""Called by WebKit when an URL should be added to the history.
|
||||
|
||||
Args:
|
||||
@ -212,3 +216,4 @@ def init(parent=None):
|
||||
"""
|
||||
history = WebHistory(parent)
|
||||
objreg.register('web-history', history)
|
||||
QWebHistoryInterface.setDefaultInterface(history)
|
||||
|
@ -146,9 +146,9 @@ class WebView(QWebView):
|
||||
objreg.get('config').changed.connect(self.on_config_changed)
|
||||
|
||||
@pyqtSlot()
|
||||
def on_initial_layout_complete(self):
|
||||
def on_initial_layout_completed(self):
|
||||
"""Add url to history now that we have displayed something."""
|
||||
objreg.get('web-history').addHistoryEntry(
|
||||
objreg.get('web-history').add_url(
|
||||
self.url().toDisplayString(), self.title())
|
||||
|
||||
def _init_page(self):
|
||||
@ -159,7 +159,7 @@ class WebView(QWebView):
|
||||
page.mainFrame().loadStarted.connect(self.on_load_started)
|
||||
page.mainFrame().loadFinished.connect(self.on_load_finished)
|
||||
page.mainFrame().initialLayoutCompleted.connect(
|
||||
self.on_initial_layout_complete)
|
||||
self.on_initial_layout_completed)
|
||||
page.statusBarMessage.connect(
|
||||
lambda msg: setattr(self, 'statusbar_message', msg))
|
||||
page.networkAccessManager().sslErrors.connect(
|
||||
|
Loading…
Reference in New Issue
Block a user