qt: don't handle object destruction event after ML task is done or canceled
The MediaLib object can perform ML requests itself, this would register an event called on object destruction, that would callback on itself but the MediaLib would be in an invalid state (partially destroyed).
Anyway we shouldn't handle object destruction events after ML task is done or canceled
fix: #26448 (closed)