Commit fb6314d7 authored by Jeremy Whiting's avatar Jeremy Whiting

Use QByteArray instead of QTemporaryFile for KIO::storedPut uploads.

parent 1640a130
......@@ -265,14 +265,12 @@ bool PhraseBook::save(const QUrl &url, bool asPhrasebook)
else
return true;
} else {
QTemporaryFile tempFile;
tempFile.open();
QTextStream ts(&tempFile);
QByteArray data;
QTextStream ts(&data);
save(ts, asPhrasebook);
ts.flush();
KIO::StoredTransferJob *uploadJob = KIO::storedPut(&tempFile, url, -1);
KIO::StoredTransferJob *uploadJob = KIO::storedPut(data, url, -1);
return uploadJob->exec();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment