Making FileJob behave consistently.
This patch does the following:
- Makes sure the close() signal is actually emitted when close() is called.
- Documents the FileJob functions more accurately, and ensures the file slave acts similarly to the two other slaves that implement these functions (smb/sftp).
- Fixes an issue when purposefully reading 0 bytes.
- Fixes a bug where finished() is called after error().
The application I am developing on that depends on FileJob now successfully receives the close() signal when required and does not experience the bug
mentioned when reading 0 bytes.
Existing read/write/seek functionality is not broken.
Tests also pass.
Reviewers: dfaure, fvogt, chinmoyr, apol
Reviewed By: dfaure, chinmoyr
Differential Revision: https://phabricator.kde.org/D23194