Fixes file transfer for Samsung Galaxy S2 with Jelly Bean 4.1.2

by setting destination QUrl's scheme if it lacks one.

REVIEW: 122221
This commit is contained in:
Lamarque V. Souza 2015-01-23 14:10:37 -02:00
parent cd62979f3c
commit 00ef52227e

View file

@ -38,6 +38,11 @@ FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64
, mSize(size)
, mWritten(0)
{
if (mDestination.scheme().isEmpty()) {
qWarning() << "Destination QUrl" << mDestination << "lacks a scheme. Setting its scheme to 'file'.";
mDestination.setScheme("file");
}
Q_ASSERT(destination.isLocalFile());
setCapabilities(Killable);
qCDebug(KDECONNECT_CORE) << "FileTransferJob Downloading payload to" << destination;