*/
#include "transferKio.h"
-#include "core/verifier.h"
-#include "core/signature.h"
#include "settings.h"
-#include <utime.h>
-
-#include <kiconloader.h>
#include <kio/scheduler.h>
#include <KIO/DeleteJob>
#include <KIO/CopyJob>
#include <KIO/NetAccess>
#include <KLocale>
+#include <KProtocolManager>
#include <KMessageBox>
#include <KDebug>
-#include <QtCore/QFile>
-
TransferKio::TransferKio(TransferGroup * parent, TransferFactory * factory,
Scheduler * scheduler, const KUrl & source, const KUrl & dest,
const QDomElement * e)
m_signature(nullptr),
m_filemodel(nullptr)
{
- // TODO: check if it really can resume
- setCapabilities(Transfer::Cap_Resuming);
+ if (KProtocolManager::autoResume()) {
+ setCapabilities(Transfer::Cap_Resuming);
+ }
}
void TransferKio::start()
void TransferKio::deinit(Transfer::DeleteOptions options)
{
- // if the transfer is not finished, we delete the *.part-file
if (options & Transfer::DeleteFiles) {
KIO::Job *del = KIO::del(m_dest, KIO::HideProgressInfo);
KIO::NetAccess::synchronousRun(del, 0);
void TransferKio::slotInfoMessage( KJob * kioJob, const QString & msg )
{
+ kDebug(5001) << "slotInfoMessage";
Q_UNUSED(kioJob);
setLog(msg, Transfer::Log_Info);
#include <kio/job.h>
#include "core/transfer.h"
+#include "core/verifier.h"
+#include "core/signature.h"
#include "core/filemodel.h"
/**
FileModel *fileModel() final;
-private:
- void createJob();
-
- KIO::FileCopyJob * m_copyjob;
-
private slots:
void slotResult( KJob * kioJob );
void slotInfoMessage( KJob * kioJob, const QString & msg );
void slotVerified(bool isVerified);
private:
+ void createJob();
+
+ KIO::FileCopyJob * m_copyjob;
Verifier *m_verifier;
Signature *m_signature;
FileModel *m_filemodel;
void MmsDownload::splitTransfer()
{
- /** We split the download in similar and each part is asigned to a thread and thi is saved in
+ /** We split the download in similar and each part is asigned to a thread and this is saved in
* a map named m_mapEndIni. If we resume the download, then the temporal file will exist
* and we dont have to split the download only use it.
*/