Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify reporting completion of tasks
QgsTask subclasses can now return a result (success or fail) directly from QgsTask::run. If they do so then there's no need for them to manually call completed() or stopped() to report their completion. Alternatively, tasks can also return the ResultPending value to indicate that the task is still operating and will manually report its completion by calling completed() or stopped(). This may be useful for tasks which rely on external events for completion, eg downloading a file. In this case Qt slots could be created which are connected to the download completion or termination and which call completed() or stopped() to indicate the task has finished operations.
- Loading branch information
1 parent
2590f68
commit e01c306
Showing
5 changed files
with
253 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.