mirror of
https://github.com/borgbase/vorta
synced 2024-12-23 00:07:58 +00:00
Fixes #2120 (ammended)
This commit is contained in:
parent
84fbf14dde
commit
420be650c0
1 changed files with 10 additions and 3 deletions
|
@ -58,9 +58,13 @@ def __init__(self, decorator_instance, wrapped_instance):
|
||||||
self.wrapped_instance = wrapped_instance
|
self.wrapped_instance = wrapped_instance
|
||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
global runner_thread
|
self.runner = AsyncRunner.Runner(self.decorator_instance, self.wrapped_instance, *args, **kwargs)
|
||||||
runner_thread = AsyncRunner.Runner(self.decorator_instance, self.wrapped_instance, *args, **kwargs)
|
self.runner.finished.connect(self.runner_finished)
|
||||||
runner_thread.start()
|
self.runner.start()
|
||||||
|
|
||||||
|
def runner_finished(self):
|
||||||
|
self.runner.wait(100)
|
||||||
|
self.runner = None
|
||||||
|
|
||||||
class Runner(QtCore.QThread):
|
class Runner(QtCore.QThread):
|
||||||
def __init__(self, decorator_instance, wrapped_instance, *args, **kwargs):
|
def __init__(self, decorator_instance, wrapped_instance, *args, **kwargs):
|
||||||
|
@ -72,8 +76,11 @@ def __init__(self, decorator_instance, wrapped_instance, *args, **kwargs):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.decorator_instance(self.wrapped_instance, *self.args, **self.kwargs)
|
self.decorator_instance(self.wrapped_instance, *self.args, **self.kwargs)
|
||||||
|
<<<<<<< HEAD
|
||||||
self.terminate()
|
self.terminate()
|
||||||
self.wait()
|
self.wait()
|
||||||
|
=======
|
||||||
|
>>>>>>> d7d1488 (Fixes #2120 (ammended))
|
||||||
|
|
||||||
|
|
||||||
class FilePathInfoAsync(QThread):
|
class FilePathInfoAsync(QThread):
|
||||||
|
|
Loading…
Reference in a new issue