diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-08-03 20:38:30 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-08-03 20:38:30 +0000 |
commit | 7af9cc1007b006f01dd2eca335f54d9304e53c71 (patch) | |
tree | 693afed1957cec7ac384f0a765ced091bae734e2 | |
parent | start porting encrypt from kgpg, not yet working (diff) | |
download | gpg4usb-7af9cc1007b006f01dd2eca335f54d9304e53c71.tar.gz gpg4usb-7af9cc1007b006f01dd2eca335f54d9304e53c71.zip |
encryption works
git-svn-id: http://cpunk.de/svn/src/gpg4usb/branches/0.3.2-mac@933 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | mainwindow.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 6f9efc2..8c7e5cf 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -774,7 +774,12 @@ void MainWindow::encrypt() QStringList *uidList = mKeyList->getChecked(); - QByteArray *tmp = new QByteArray(); + if (uidList->count() == 0) { + QMessageBox::critical(0, tr("No Key Selected"), tr("No Key Selected")); + return; + } + + //QByteArray *tmp = new QByteArray(); /*if (mCtx->encrypt(uidList, edit->curTextPage()->toPlainText().toUtf8(), tmp)) { QString *tmp2 = new QString(*tmp); edit->fillTextEditWithText(*tmp2); @@ -783,6 +788,9 @@ void MainWindow::encrypt() QStringList options; KGpgEncrypt::EncryptOptions opts = KGpgEncrypt::DefaultEncryption; + opts |= KGpgEncrypt::AllowUntrustedEncryption; + opts |= KGpgEncrypt::AsciiArmored; + KGpgEncrypt *encr = new KGpgEncrypt(this, *uidList, edit->curTextPage()->toPlainText(), opts, options); encr->start(); connect(encr, SIGNAL(done(int)), SLOT(slotEncryptDone(int))); |