No need to use a QBuffer in DownloadJob
AbandonedPublic

Authored by aacid on May 30 2017, 10:28 PM.

Details

Summary

QSslSocket is already a QIODevice so just use that.

Should fix the issue of transfering *big* files.

Unfortunately this seems to trigger a bug in KIO and CPU usage goes through the roof, so haven't really been able to test it does actually fix things.

Please don't merge/approve yet

Diff Detail

Repository
R224 KDE Connect
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
aacid created this revision.May 30 2017, 10:28 PM
aacid edited the summary of this revision. (Show Details)
aacid added a subscriber: KDE Connect.
apol added inline comments.May 30 2017, 10:33 PM
core/backends/lan/downloadjob.cpp
74–76

qCWarning(KDECONNECT_CORE)

87

Why do we need to emit upon connected?

core/filetransferjob.cpp
82

don't put?

aacid added inline comments.May 30 2017, 10:50 PM
core/backends/lan/downloadjob.cpp
74–76

Not what was used, but i can improve it if you want.

87

Because it's when you can start using the socket iodevice.

core/filetransferjob.cpp
82

as in

mReply = Daemon::instance()->networkAccessManager()->put(req, mOrigin.data());

that is 12 lines lower in this file

This revision was automatically updated to reflect the committed changes.
aacid abandoned this revision.Aug 1 2017, 10:38 PM

Superseeded by another patch