Emit the completed signal automatically in ThreadPoolJob.

This commit is contained in:
Relintai 2023-06-05 09:07:58 +02:00
parent 9a2a39923a
commit 6dc774cf5c

View File

@ -30,7 +30,16 @@ bool ThreadPoolJob::get_complete() const {
return _complete;
}
void ThreadPoolJob::set_complete(const bool value) {
bool call_signal = false;
if (!_complete && value) {
call_signal = true;
}
_complete = value;
if (call_signal) {
emit_signal("completed");
}
}
bool ThreadPoolJob::get_cancelled() const {