From 7e8e9ee21f53ccc385cd1c17dd1954c7a7b288af Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 24 Sep 2014 20:29:38 +0200 Subject: [PATCH] Get rid of _page attribute of WebView --- qutebrowser/widgets/webview.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/qutebrowser/widgets/webview.py b/qutebrowser/widgets/webview.py index a24d49439..decb87c65 100644 --- a/qutebrowser/widgets/webview.py +++ b/qutebrowser/widgets/webview.py @@ -51,7 +51,6 @@ class WebView(QWebView): open_target: Where to open the next tab ("normal", "tab", "tab_bg") viewing_source: Whether the webview is currently displaying source code. - _page: The QWebPage behind the view _cur_url: The current URL (accessed via cur_url property). _has_ssl_errors: Whether SSL errors occured during loading. _zoom: A NeighborList with the zoom levels. @@ -90,16 +89,16 @@ class WebView(QWebView): self._cur_url = None self.cur_url = QUrl() self.progress = 0 - self._page = webpage.BrowserPage(self) - self.setPage(self._page) + page = webpage.BrowserPage(self) + self.setPage(page) self.hintmanager = hints.HintManager(self) self.hintmanager.mouse_event.connect(self.on_mouse_event) self.hintmanager.set_open_target.connect(self.set_force_open_target) - self._page.linkHovered.connect(self.linkHovered) - self._page.mainFrame().loadStarted.connect(self.on_load_started) - self._page.change_title.connect(self.titleChanged) + page.linkHovered.connect(self.linkHovered) + page.mainFrame().loadStarted.connect(self.on_load_started) + page.change_title.connect(self.titleChanged) self.urlChanged.connect(self.on_url_changed) - self._page.mainFrame().loadFinished.connect(self.on_load_finished) + page.mainFrame().loadFinished.connect(self.on_load_finished) self.loadProgress.connect(lambda p: setattr(self, 'progress', p)) self.page().statusBarMessage.connect( lambda msg: setattr(self, 'statusbar_message', msg))