Handle transfer job being canceled
Set KilledJobError to indicate it was canceled by the user to avoid a bogus "finished" notification. Sadly, fileTransferCanceled has been removed from libQuotient so this lambda botch checking transfer status needs to be done.
This commit is contained in:
@@ -41,6 +41,15 @@ void FileTransferPseudoJob::fileTransferFailed(const QString &id, const QString
|
||||
emitResult();
|
||||
}
|
||||
|
||||
void FileTransferPseudoJob::fileTransferCanceled(const QString &id)
|
||||
{
|
||||
if (id != m_eventId) {
|
||||
return;
|
||||
}
|
||||
setError(KJob::KilledJobError);
|
||||
emitResult();
|
||||
}
|
||||
|
||||
void FileTransferPseudoJob::start()
|
||||
{
|
||||
setTotalAmount(Unit::Files, 1);
|
||||
|
||||
Reference in New Issue
Block a user