mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 06:14:16 +02:00
fix: show_error for install and downgrade threads
This commit is contained in:
@@ -52,9 +52,6 @@ class AsyncAction(QThread, ProcessHandler):
|
||||
proc.subproc.communicate()
|
||||
return proc.subproc.returncode is None or proc.subproc.returncode == 0
|
||||
|
||||
def show_error(self, title: str, body: str):
|
||||
dialog.show_error(title, body)
|
||||
|
||||
|
||||
class UpdateSelectedApps(AsyncAction):
|
||||
|
||||
@@ -137,6 +134,7 @@ class UninstallApp(AsyncAction):
|
||||
|
||||
class DowngradeApp(AsyncAction):
|
||||
signal_finished = pyqtSignal(bool)
|
||||
signal_error = pyqtSignal(dict)
|
||||
signal_output = pyqtSignal(str)
|
||||
|
||||
def __init__(self, manager: ApplicationManager, locale_keys: dict, app: ApplicationView = None):
|
||||
@@ -166,6 +164,9 @@ class DowngradeApp(AsyncAction):
|
||||
if msg:
|
||||
self.signal_output.emit(msg)
|
||||
|
||||
def show_error(self, title: str, body: str):
|
||||
self.signal_error.emit({'title': title, 'body': body})
|
||||
|
||||
|
||||
class GetAppInfo(QThread):
|
||||
signal_finished = pyqtSignal(dict)
|
||||
@@ -226,6 +227,7 @@ class SearchApps(QThread):
|
||||
class InstallApp(AsyncAction):
|
||||
|
||||
signal_finished = pyqtSignal(object)
|
||||
signal_error = pyqtSignal(dict)
|
||||
signal_output = pyqtSignal(str)
|
||||
|
||||
def __init__(self, manager: ApplicationManager, disk_cache: bool, icon_cache: Cache, locale_keys: dict, app: ApplicationView = None):
|
||||
@@ -267,6 +269,9 @@ class InstallApp(AsyncAction):
|
||||
if msg:
|
||||
self.signal_output.emit(msg)
|
||||
|
||||
def show_error(self, title: str, body: str):
|
||||
self.signal_error.emit({'title': title, 'body': body})
|
||||
|
||||
|
||||
class AnimateProgress(QThread):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user