A method requestInterruption() have been added to QThread in Qt 5.2.
It is very usefull. However, there is no way to reset the interruptionRequested attribute. So if you stop a job running once, you can't then start new jobs later since those job will check the interruptionRequested attribute and see that it is already true.
I can find 2 solutions to that (that keep compatibility):
- The method requestInterruption() can take a boolean parameter (which is true by default)
- Create a new method resetRequestedInterruption()