diff options
Diffstat (limited to 'attachments.cpp')
-rw-r--r-- | attachments.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/attachments.cpp b/attachments.cpp index 82c2e6a..8158da6 100644 --- a/attachments.cpp +++ b/attachments.cpp @@ -127,6 +127,7 @@ void Attachments::saveByteArrayToFile(QByteArray outBuffer, QString filename) QDataStream out(&outfile); out.writeRawData(outBuffer.data(), outBuffer.length()); + outfile.close(); } /** @@ -171,7 +172,7 @@ void Attachments::openFile() { QDataStream out(&outfile); out.writeRawData(outBuffer.data(), outBuffer.length()); - + outfile.close(); QDesktopServices::openUrl(QUrl("file://"+filename, QUrl::TolerantMode)); } |