diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-23 18:50:24 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-23 18:50:24 +0000 |
commit | 6dd965df7ec9c33d508b24b08b4181a5ebfb46ae (patch) | |
tree | 8aec5ab335b61e2111a5b36d98105b4f49afa93c /keymgmt.cpp | |
parent | added icons for sign and verify and the actions to toolbar (diff) | |
download | gpg4usb-6dd965df7ec9c33d508b24b08b4181a5ebfb46ae.tar.gz gpg4usb-6dd965df7ec9c33d508b24b08b4181a5ebfb46ae.zip |
show appropriate filename in key export to file
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@519 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'keymgmt.cpp')
-rwxr-xr-x | keymgmt.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/keymgmt.cpp b/keymgmt.cpp index 73f2282..4814c5a 100755 --- a/keymgmt.cpp +++ b/keymgmt.cpp @@ -226,7 +226,10 @@ void KeyMgmt::exportKeyToFile() if (!mCtx->exportKeys(mKeyList->getChecked(), keyArray)) { return; } - QString fileName = QFileDialog::getSaveFileName(this, tr("Export Key To File"), "", tr("Key Files") + " (*.asc *.txt);;All Files (*)"); + gpgme_key_t key = mCtx->getKeyDetails(mKeyList->getChecked()->first()); + QString fileString = QString(key->uids->name) + " " + QString(key->uids->email) + "(" + QString(key->subkeys->keyid)+ ")_pub.asc"; + + QString fileName = QFileDialog::getSaveFileName(this, tr("Export Key To File"), fileString, tr("Key Files") + " (*.asc *.txt);;All Files (*)"); QFile file(fileName); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) return; |