Delete question if download as cancelled

This commit is contained in:
Florian Bruhin 2014-06-17 11:26:45 +02:00
parent 61e8940ccb
commit 2388874e82
3 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,6 @@
import os import os
import sys import sys
import types
import faulthandler import faulthandler
import configparser import configparser
from bdb import BdbQuit from bdb import BdbQuit

View File

@ -372,6 +372,7 @@ class DownloadManager(QObject):
q.cancelled.connect(q.deleteLater) q.cancelled.connect(q.deleteLater)
self.questions.append(q) self.questions.append(q)
download.cancelled.connect(q.abort) download.cancelled.connect(q.abort)
download.cancelled.connect(q.deleteLater)
message.instance().question.emit(q, False) message.instance().question.emit(q, False)
@pyqtSlot(DownloadItem) @pyqtSlot(DownloadItem)

View File

@ -18,6 +18,7 @@
"""Utilities used for debugging.""" """Utilities used for debugging."""
import sys import sys
import types
from functools import wraps from functools import wraps
from PyQt5.QtCore import (pyqtRemoveInputHook, QEvent, QCoreApplication, from PyQt5.QtCore import (pyqtRemoveInputHook, QEvent, QCoreApplication,