mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-04 12:41:50 +02:00
remove unneeded "finished" signal in QThread
QThread already sends a "finished" signal when it ends. This also
solves a previously introduced bug where the signal had a signature
of one bool argument representing if there was an error or not.
This arg's inclusion was introduced in commit ea47a2e92c
but seems it was added by mistake as the slot that catches the
signal (ConvertWidget.all_done) doesn't have any arguments.
This last part in particular was introducing an error in Qt6
since the signal became a private signal, whereas Qt 5 had
defined it as a just a signal [1].
[1]: https://github.com/freedomofpress/dangerzone/pull/164#discussion_r896373680
This commit is contained in:
parent
bdc08d79cd
commit
7d61508099
1 changed files with 2 additions and 4 deletions
|
@ -486,7 +486,6 @@ class SettingsWidget(QtWidgets.QWidget):
|
|||
|
||||
|
||||
class ConvertThread(QtCore.QThread):
|
||||
is_finished = QtCore.Signal(bool)
|
||||
update = QtCore.Signal(bool, str, int)
|
||||
|
||||
def __init__(self, global_common, common):
|
||||
|
@ -503,13 +502,12 @@ class ConvertThread(QtCore.QThread):
|
|||
else:
|
||||
ocr_lang = None
|
||||
|
||||
if convert(
|
||||
convert(
|
||||
self.common.input_filename,
|
||||
self.common.output_filename,
|
||||
ocr_lang,
|
||||
self.stdout_callback,
|
||||
):
|
||||
self.is_finished.emit(self.error)
|
||||
)
|
||||
|
||||
def stdout_callback(self, line):
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue