Fix wrong size being passed (QString::size -> QFile::size)
Fixes test
This commit is contained in:
parent
a8e9c0d002
commit
8142a2c92f
1 changed files with 3 additions and 2 deletions
|
@ -109,7 +109,8 @@ class TestSendFile : public QObject
|
|||
|
||||
QSharedPointer<QFile> f(new QFile(aFile));
|
||||
NetworkPacket np(PACKET_TYPE_SHARE_REQUEST);
|
||||
np.setPayload(f, aFile.size());
|
||||
np.setPayload(f, f->size());
|
||||
|
||||
CompositeUploadJob* job = new CompositeUploadJob(deviceId, false);
|
||||
UploadJob* uj = new UploadJob(np);
|
||||
job->addSubjob(uj);
|
||||
|
@ -119,7 +120,7 @@ class TestSendFile : public QObject
|
|||
|
||||
f->open(QIODevice::ReadWrite);
|
||||
|
||||
FileTransferJob* ft = new FileTransferJob(f, aFile.size(), QUrl::fromLocalFile(destFile));
|
||||
FileTransferJob* ft = np.createPayloadTransferJob(QUrl::fromLocalFile(destFile));
|
||||
|
||||
QSignalSpy spyTransfer(ft, &KJob::result);
|
||||
|
||||
|
|
Loading…
Reference in a new issue