1
0
Fork 0
mirror of synced 2024-06-23 08:40:45 +12:00

Don't use global threadpool as it gets deleted when exiting the dialog

Woops...
This commit is contained in:
Stelios Tsampas 2021-05-23 00:07:47 +03:00
parent 148cf0ff8e
commit 376d3e0eba

View file

@ -24,7 +24,8 @@ class InstallDialog(QDialog, Ui_InstallDialog):
self.game = self.core.get_game(app_name)
self.update_game = update
self.threadpool = QThreadPool.globalInstance()
self.threadpool = QThreadPool(self)
self.threadpool.setMaxThreadCount(1)
header = self.tr("Update") if update else self.tr("Install")
self.install_dialog_label.setText(f"<h3>{header} \"{self.game.app_title}\"</h3>")