mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 20:36:53 +01:00
Emit the completed signal automatically in ThreadPoolJob.
This commit is contained in:
parent
9a2a39923a
commit
6dc774cf5c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user