/***************************************************************************
- * Copyright (C) 2005-2015 by the Quassel Project *
+ * Copyright (C) 2005-2016 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
}
+quint64 ClientTransfer::transferred() const
+{
+ if (status() == Status::Completed)
+ return fileSize();
+
+ return _file ? _file->size() : 0;
+}
+
+
void ClientTransfer::cleanUp()
{
if (_file) {
qWarning() << Q_FUNC_INFO << "Could not write to file:" << _file->errorString();
return;
}
+
+ emit transferredChanged(transferred());
}