mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix: allow aborting upload tasks
This maintains the same behaviour as the Download task. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
882c82f82c
commit
91776311c7
2 changed files with 12 additions and 0 deletions
|
|
@ -43,6 +43,16 @@
|
|||
|
||||
namespace Net {
|
||||
|
||||
bool Upload::abort()
|
||||
{
|
||||
if (m_reply) {
|
||||
m_reply->abort();
|
||||
} else {
|
||||
m_state = State::AbortedByUser;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Upload::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) {
|
||||
setProgress(bytesReceived, bytesTotal);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue