Commit e4c3e8c4 authored by Àlex Fiestas's avatar Àlex Fiestas
Browse files

Implement virtual KJob::doKill in FileTransferJob

This basically allows killing the job from the JobTrakcer
aka Plasma.
parent a75bfe5f
...@@ -201,3 +201,13 @@ void FileTransferJob::sourceFinished() ...@@ -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: ...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment