Remove remove_data arg for DownloadItem.cancel
This was added in f0779f8cc0
but never
actually used.
This commit is contained in:
parent
b5b46332c7
commit
ece85dc903
@ -481,12 +481,8 @@ class DownloadItem(QObject):
|
|||||||
self.stats.percentage(), system)
|
self.stats.percentage(), system)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def cancel(self, remove_data=True):
|
def cancel(self):
|
||||||
"""Cancel the download.
|
"""Cancel the download."""
|
||||||
|
|
||||||
Args:
|
|
||||||
remove_data: Whether to remove the downloaded data.
|
|
||||||
"""
|
|
||||||
log.downloads.debug("cancelled")
|
log.downloads.debug("cancelled")
|
||||||
self._read_timer.stop()
|
self._read_timer.stop()
|
||||||
self.cancelled.emit()
|
self.cancelled.emit()
|
||||||
@ -497,8 +493,7 @@ class DownloadItem(QObject):
|
|||||||
self.reply = None
|
self.reply = None
|
||||||
if self.fileobj is not None:
|
if self.fileobj is not None:
|
||||||
self.fileobj.close()
|
self.fileobj.close()
|
||||||
if remove_data:
|
self.delete()
|
||||||
self.delete()
|
|
||||||
self.done = True
|
self.done = True
|
||||||
self.finished.emit()
|
self.finished.emit()
|
||||||
self.data_changed.emit()
|
self.data_changed.emit()
|
||||||
|
Loading…
Reference in New Issue
Block a user