Add logging for acceptNavigationRequest.

This commit is contained in:
Florian Bruhin 2015-03-03 09:06:43 +01:00
parent caf0c76a4e
commit 21ab5f8685

View File

@ -33,7 +33,7 @@ from qutebrowser.config import config
from qutebrowser.browser import http, tabhistory from qutebrowser.browser import http, tabhistory
from qutebrowser.browser.network import networkmanager from qutebrowser.browser.network import networkmanager
from qutebrowser.utils import (message, usertypes, log, jinja, qtutils, utils, from qutebrowser.utils import (message, usertypes, log, jinja, qtutils, utils,
objreg) objreg, debug)
class BrowserPage(QWebPage): class BrowserPage(QWebPage):
@ -538,6 +538,10 @@ class BrowserPage(QWebPage):
return False return False
tabbed_browser = objreg.get('tabbed-browser', scope='window', tabbed_browser = objreg.get('tabbed-browser', scope='window',
window=self._win_id) window=self._win_id)
log.webview.debug("acceptNavigationRequest, url {}, type {}, hint "
"target {}, open_target {}".format(
urlstr, debug.qenum_key(QWebPage, typ),
self._hint_target, self.open_target))
if self._hint_target is not None: if self._hint_target is not None:
target = self._hint_target target = self._hint_target
else: else: