From 48441b291c4dd3290ed0e45aa636e58e0473cf85 Mon Sep 17 00:00:00 2001 From: nils Date: Thu, 19 Jan 2012 22:06:50 +0000 Subject: added file.close for every file.open git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@767 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- fileencryptiondialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fileencryptiondialog.cpp') diff --git a/fileencryptiondialog.cpp b/fileencryptiondialog.cpp index 94ed540..0e1ec8b 100755 --- a/fileencryptiondialog.cpp +++ b/fileencryptiondialog.cpp @@ -37,7 +37,6 @@ FileEncryptionDialog::FileEncryptionDialog(GpgME::GpgContext *ctx, QStringList k resize(500, 200); } - setModal(true); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); @@ -156,8 +155,7 @@ void FileEncryptionDialog::executeAction() QByteArray inBuffer = infile.readAll(); QByteArray *outBuffer = new QByteArray(); - - + infile.close(); if ( mAction == Encrypt || (mAction == Both && radioEnc->isChecked())) { if (! mCtx->encrypt(mKeyList->getChecked(), inBuffer, outBuffer)) return; } @@ -187,7 +185,9 @@ void FileEncryptionDialog::executeAction() QDataStream out(&outfile); out.writeRawData(outBuffer->data(), outBuffer->length()); + outfile.close(); QMessageBox::information(0, "Done", "Output saved to " + outputFileEdit->text()); + accept(); } -- cgit v1.2.3