diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-01-15 18:04:37 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-01-15 18:04:37 +0000 |
commit | a959b0b945d8a01f62544bfb73f03ad6f900a38d (patch) | |
tree | 0c2ea13635b636a79bef8bc6b8c73018033047ed /wizard.cpp | |
parent | hint to possibly fix newer gpgme for win (diff) | |
download | gpg4usb-a959b0b945d8a01f62544bfb73f03ad6f900a38d.tar.gz gpg4usb-a959b0b945d8a01f62544bfb73f03ad6f900a38d.zip |
mainwindow reloadable, e.g. when translation changes
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@741 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'wizard.cpp')
-rw-r--r-- | wizard.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -27,6 +27,7 @@ Wizard::Wizard(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent) { mCtx=ctx; mKeyMgmt=keyMgmt; + mParent=parent; IntroPage *introPage = new IntroPage(); KeyGenPage *keyGenPage = new KeyGenPage(mCtx); ImportPage *importPage = new ImportPage(mCtx,mKeyMgmt); @@ -186,6 +187,8 @@ bool ImportPage::importKeysFromGpg4usb() return false; } + importConfFromGpg4usb(dir); + QFile secRing(dir+"/keydb/secring.gpg"); QFile pubRing(dir+"/keydb/pubring.gpg"); @@ -213,9 +216,23 @@ bool ImportPage::importKeysFromGpg4usb() QByteArray inBuffer = secRing.readAll(); mKeyMgmt->importKeys(inBuffer); } + + qApp->exit(); return true; } +bool ImportPage::importConfFromGpg4usb(QString dir) { + QString path = dir+"/conf/gpg4usb.ini"; + qDebug() << "import old conf from: " << path; + QSettings oldconf(path, QSettings::IniFormat, this); + QSettings actualConf; + foreach(QString key, oldconf.allKeys()) { + qDebug() << key << ": " << oldconf.value(key); + actualConf.setValue(key, oldconf.value(key)); + } + +} + bool ImportPage::importKeysFromGnupg() { // first get gnupghomedir and check, if it exists |