[view.qt] fix: QT crash in case the file downloader thread is still alive

This commit is contained in:
Vinicius Moreira
2023-11-28 17:22:05 -03:00
parent 656661b7b8
commit 442ef76035
3 changed files with 12 additions and 2 deletions

View File

@@ -605,6 +605,9 @@ class PackagesTable(QTableWidget):
self.file_downloader.signal_downloaded.connect(self._update_pkg_icon)
self.file_downloader.start()
def stop_file_downloader(self) -> None:
def stop_file_downloader(self, wait: bool = False) -> None:
if self.file_downloader:
self.file_downloader.stop()
if wait:
self.file_downloader.wait()