From d3005e154c3506aefefb5fa80486c625aa8e732c Mon Sep 17 00:00:00 2001 From: nils Date: Tue, 24 Jan 2012 20:39:35 +0000 Subject: added import keys from older gpg4usb git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@770 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- wizard.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/wizard.cpp b/wizard.cpp index a34817e..5f3d68f 100644 --- a/wizard.cpp +++ b/wizard.cpp @@ -193,15 +193,14 @@ bool ImportFromGpg4usbPage::importFormOlderGpg4usb() return false; } - QFile secRing(dir+"/keydb/secring.gpg"); - QFile pubRing(dir+"/keydb/pubring.gpg"); - - // Return, if no keyrings are found in subdir of chosen dir - if (!(pubRing.exists() or secRing.exists())) { - QMessageBox::critical(0, tr("Import Error"), tr("Couldn't locate any keyring file in %1").arg(dir+"/keydb")); - return false; + // try to import keys, if appropriate box is checked, return, if import was unsuccessful + if (gpg4usbKeyCheckBox->isChecked()) { + if (!Wizard::importPubAndSecKeysFromDir(dir+"/keydb",mKeyMgmt)) { + return false; + } } + // try to import config, if appropriate box is checked if (gpg4usbConfigCheckBox->isChecked()) { importConfFromGpg4usb(dir); -- cgit v1.2.3