Implement virtual KJob::doKill in FileTransferJob
This basically allows killing the job from the JobTrakcer aka Plasma.
This commit is contained in:
parent
a75bfe5f0d
commit
e4c3e8c4cd
2 changed files with 12 additions and 0 deletions
|
@ -201,3 +201,13 @@ void FileTransferJob::sourceFinished()
|
||||||
emitResult();
|
emitResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FileTransferJob::doKill()
|
||||||
|
{
|
||||||
|
if (mDestinationJob) {
|
||||||
|
mDestinationJob->close();
|
||||||
|
}
|
||||||
|
if (mOrigin) {
|
||||||
|
mOrigin->close();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
@ -50,6 +50,8 @@ public Q_SLOTS:
|
||||||
void sourceFinished();
|
void sourceFinished();
|
||||||
void openFinished(KJob*);
|
void openFinished(KJob*);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool doKill();
|
||||||
private:
|
private:
|
||||||
void startTransfer();
|
void startTransfer();
|
||||||
QSharedPointer<QIODevice> mOrigin;
|
QSharedPointer<QIODevice> mOrigin;
|
||||||
|
|
Loading…
Reference in a new issue