aboutsummaryrefslogtreecommitdiffstats
path: root/wizard.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-26 23:19:47 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-26 23:19:47 +0000
commitdd31e6407bfc1349453920b36e83aa709dcaca27 (patch)
treea775c961f8f897565d4fae5ea7c690c4d5648a74 /wizard.cpp
parentadded structure for keyimportresult and emit keydbchanged in gpgcontext (diff)
downloadgpg4usb-dd31e6407bfc1349453920b36e83aa709dcaca27.tar.gz
gpg4usb-dd31e6407bfc1349453920b36e83aa709dcaca27.zip
show importdetaildialog in all places
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@704 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'wizard.cpp')
-rw-r--r--wizard.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/wizard.cpp b/wizard.cpp
index 5473dc3..b9fd914 100644
--- a/wizard.cpp
+++ b/wizard.cpp
@@ -23,13 +23,14 @@
#include "wizard.h"
-Wizard::Wizard(GpgME::GpgContext *ctx, QWidget *parent)
+Wizard::Wizard(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent)
: QWizard(parent)
{
mCtx=ctx;
+ mKeyMgmt=keyMgmt;
IntroPage *introPage = new IntroPage();
KeyGenPage *keyGenPage = new KeyGenPage(mCtx);
- ImportPage *importPage = new ImportPage(mCtx);
+ ImportPage *importPage = new ImportPage(mCtx,mKeyMgmt);
ConclusionPage *conclusionPage = new ConclusionPage();
addPage(introPage);
addPage(keyGenPage);
@@ -106,10 +107,11 @@ void KeyGenPage::showKeyGeneratedMessage()
layout->addWidget(new QLabel(tr("key generated. Now you can crypt and sign texts.")));
}
-ImportPage::ImportPage(GpgME::GpgContext *ctx, QWidget *parent)
+ImportPage::ImportPage(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent)
: QWizardPage(parent)
{
mCtx=ctx;
+ mKeyMgmt=keyMgmt;
setTitle(tr("Keyring Import"));
QGroupBox *gnupgBox = new QGroupBox(tr("Import from GnuPG"), this);
@@ -198,7 +200,7 @@ bool ImportPage::importKeysFromGpg4usb()
return false;
}
QByteArray inBuffer = pubRing.readAll();
- mCtx->importKey(inBuffer);
+ mKeyMgmt->importKeys(inBuffer);
}
if (secRing.exists() and gnupgPrivKeyCheckBox->isChecked()) {
@@ -207,7 +209,7 @@ bool ImportPage::importKeysFromGpg4usb()
return false;
}
QByteArray inBuffer = secRing.readAll();
- mCtx->importKey(inBuffer);
+ mKeyMgmt->importKeys(inBuffer);
}
return true;
}
@@ -232,7 +234,7 @@ bool ImportPage::importKeysFromGnupg()
}
QByteArray inBuffer = file.readAll();
- mCtx->importKey(inBuffer);
+ mKeyMgmt->importKeys(inBuffer);
}
// try to import public keys, if public checkbox is checked
@@ -246,7 +248,7 @@ bool ImportPage::importKeysFromGnupg()
}
QByteArray inBuffer = file.readAll();
- mCtx->importKey(inBuffer);
+ mKeyMgmt->importKeys(inBuffer);
}
return true;