Abort download question on errors. Fixes #266.

This commit is contained in:
Florian Bruhin 2014-11-30 15:34:15 +01:00
parent a00dd7b679
commit 25a665e601

View File

@ -599,6 +599,7 @@ class DownloadManager(QAbstractListModel):
q.destroyed.connect(functools.partial(self.questions.remove, q)) q.destroyed.connect(functools.partial(self.questions.remove, q))
self.questions.append(q) self.questions.append(q)
download.cancelled.connect(q.abort) download.cancelled.connect(q.abort)
download.error.connect(q.abort)
message_bridge = objreg.get('message-bridge', scope='window', message_bridge = objreg.get('message-bridge', scope='window',
window=self._win_id) window=self._win_id)
message_bridge.ask(q, blocking=False) message_bridge.ask(q, blocking=False)