Avoid download_get signal.
This commit is contained in:
parent
c19b8fe982
commit
4783df8c32
@ -459,7 +459,6 @@ class Application(QApplication):
|
||||
|
||||
# downloads
|
||||
tabs.start_download.connect(download_manager.fetch)
|
||||
tabs.download_get.connect(download_manager.get)
|
||||
|
||||
def _get_widgets(self):
|
||||
"""Get a string list of all widgets."""
|
||||
|
@ -766,8 +766,7 @@ class CommandDispatcher:
|
||||
def download_page(self):
|
||||
"""Download the current page."""
|
||||
page = self._current_widget().page()
|
||||
tabbed_browser = objreg.get('tabbed-browser')
|
||||
tabbed_browser.download_get.emit(self._current_url(), page)
|
||||
objreg.get('download-manager').get(self._current_url(), page)
|
||||
|
||||
@cmdutils.register(instance='command-dispatcher')
|
||||
def view_source(self):
|
||||
|
@ -31,7 +31,8 @@ from qutebrowser.config import config
|
||||
from qutebrowser.keyinput import modeman
|
||||
from qutebrowser.browser import webelem
|
||||
from qutebrowser.commands import userscripts, cmdexc
|
||||
from qutebrowser.utils import usertypes, log, qtutils, message, objreg
|
||||
from qutebrowser.utils import (usertypes, log, qtutils, message, objreg,
|
||||
cmdutils)
|
||||
|
||||
|
||||
ElemTuple = collections.namedtuple('ElemTuple', 'elem, label')
|
||||
@ -103,9 +104,6 @@ class HintManager(QObject):
|
||||
arg 0: URL to open as QUrl.
|
||||
arg 1: True if it should be opened in a new tab, else False.
|
||||
set_open_target: Set a new target to open the links in.
|
||||
download_get: Download an URL.
|
||||
arg 0: The URL to download, as QUrl.
|
||||
arg 1: The QWebPage to download the URL in.
|
||||
"""
|
||||
|
||||
HINT_CSS = """
|
||||
@ -139,7 +137,6 @@ class HintManager(QObject):
|
||||
mouse_event = pyqtSignal('QMouseEvent')
|
||||
openurl = pyqtSignal('QUrl', bool)
|
||||
set_open_target = pyqtSignal(str)
|
||||
download_get = pyqtSignal('QUrl', 'QWebPage')
|
||||
|
||||
def __init__(self, parent=None):
|
||||
"""Constructor.
|
||||
@ -362,7 +359,7 @@ class HintManager(QObject):
|
||||
immediately=True)
|
||||
return
|
||||
qtutils.ensure_valid(url)
|
||||
self.download_get.emit(url, elem.webFrame().page())
|
||||
cmdreg.get('download-manager').get(url, elem.webFrame().page())
|
||||
|
||||
def _call_userscript(self, url):
|
||||
"""Call an userscript from a hint."""
|
||||
|
@ -78,7 +78,6 @@ class TabbedBrowser(tabwidget.TabWidget):
|
||||
current_tab_changed: The current tab changed to the emitted WebView.
|
||||
title_changed: Emitted when the application title should be changed.
|
||||
arg: The new title as string.
|
||||
download_get: Emitted when a QUrl should be downloaded.
|
||||
"""
|
||||
|
||||
cur_progress = pyqtSignal(int)
|
||||
@ -90,7 +89,6 @@ class TabbedBrowser(tabwidget.TabWidget):
|
||||
cur_scroll_perc_changed = pyqtSignal(int, int)
|
||||
cur_load_status_changed = pyqtSignal(str)
|
||||
start_download = pyqtSignal('QNetworkReply*')
|
||||
download_get = pyqtSignal('QUrl', 'QWebPage')
|
||||
hint_strings_updated = pyqtSignal(list)
|
||||
quit = pyqtSignal()
|
||||
resized = pyqtSignal('QRect')
|
||||
@ -155,7 +153,6 @@ class TabbedBrowser(tabwidget.TabWidget):
|
||||
functools.partial(self.on_url_text_changed, tab))
|
||||
# hintmanager
|
||||
tab.hintmanager.hint_strings_updated.connect(self.hint_strings_updated)
|
||||
tab.hintmanager.download_get.connect(self.download_get)
|
||||
tab.hintmanager.openurl.connect(self.openurl)
|
||||
self.cur_load_started.connect(self.on_cur_load_started)
|
||||
# downloads
|
||||
|
Loading…
Reference in New Issue
Block a user