{"action":"opened","issue":{"url":"https://api.github.com/repos/nitroshare/nitroshare-desktop/issues/2","labels_url":"https://api.github.com/repos/nitroshare/nitroshare-desktop/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/nitroshare/nitroshare-desktop/issues/2/comments","events_url":"https://api.github.com/repos/nitroshare/nitroshare-desktop/issues/2/events","html_url":"https://github.com/nitroshare/nitroshare-desktop/issues/2","id":55964958,"number":2,"title":"Ability to cancel transfers in progress","user":{"login":"nathan-osman","id":1253444,"avatar_url":"https://avatars.githubusercontent.com/u/1253444?v=3","gravatar_id":"","url":"https://api.github.com/users/nathan-osman","html_url":"https://github.com/nathan-osman","followers_url":"https://api.github.com/users/nathan-osman/followers","following_url":"https://api.github.com/users/nathan-osman/following{/other_user}","gists_url":"https://api.github.com/users/nathan-osman/gists{/gist_id}","starred_url":"https://api.github.com/users/nathan-osman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathan-osman/subscriptions","organizations_url":"https://api.github.com/users/nathan-osman/orgs","repos_url":"https://api.github.com/users/nathan-osman/repos","events_url":"https://api.github.com/users/nathan-osman/events{/privacy}","received_events_url":"https://api.github.com/users/nathan-osman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nitroshare/nitroshare-desktop/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-29T22:11:17Z","updated_at":"2015-01-29T22:11:17Z","closed_at":null,"body":"Currently, there is no way to cancel a transfer that is in progress. The implementation should look something like this:\r\n\r\n- `TransferModel` and `TransferDelegate` should be modified to display a cancel button in a third column\r\n- When clicked, the button should retrieve a `TransferPointer` for the `Transfer` that corresponds with the row\r\n- `Transfer` contains a member function named `cancel()` that can be used to communicate with the transfer thread and abort the transfer\r\n\r\nOnce the cancel signal is sent to the transfer thread, it will cause any pending `waitFor()` functions to abort with an error and eventually cause the `Transfer`'s `error()` signal to be emitted.\r\n\r\nAlthough cancelation isn't technically an _error_, having it appear as one is sufficient for now."}}