summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heinecke <aheinecke@intevation.de>2016-08-11 13:13:01 (GMT)
committerAndre Heinecke <aheinecke@intevation.de>2016-08-11 13:13:01 (GMT)
commitc24d6945965bc27e15fefca2e137bc852dc03305 (patch)
treec4bf96fb8f48c697150ad7efec8ccb3de6a6bcc3
parent2c20f98c198364862e1340e3fa5076c1f8edd3c2 (diff)
Save / Restore Sigencfileswizard geometry
-rw-r--r--src/crypto/gui/signencryptfileswizard.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/crypto/gui/signencryptfileswizard.cpp b/src/crypto/gui/signencryptfileswizard.cpp
index 41a7611..70744a1 100644
--- a/src/crypto/gui/signencryptfileswizard.cpp
+++ b/src/crypto/gui/signencryptfileswizard.cpp
@@ -38,6 +38,8 @@
#include "newresultpage.h"
#include <KLocalizedString>
+#include <KSharedConfig>
+#include <KConfigGroup>
#include <KMessageBox>
@@ -320,6 +322,13 @@ SignEncryptFilesWizard::SignEncryptFilesWizard(QWidget *parent, Qt::WindowFlags
setOptions(QWizard::IndependentPages |
QWizard::NoBackButtonOnLastPage |
QWizard::NoBackButtonOnStartPage);
+
+ KConfigGroup cfgGroup(KSharedConfig::openConfig(), "SignEncryptFilesWizard");
+ const QByteArray geom = cfgGroup.readEntry("geometry", QByteArray());
+ if (!geom.isEmpty()) {
+ restoreGeometry(geom);
+ return;
+ }
}
void SignEncryptFilesWizard::slotCurrentIdChanged(int id)
@@ -332,6 +341,9 @@ void SignEncryptFilesWizard::slotCurrentIdChanged(int id)
SignEncryptFilesWizard::~SignEncryptFilesWizard()
{
qCDebug(KLEOPATRA_LOG);
+ KConfigGroup cfgGroup(KSharedConfig::openConfig(), "SignEncryptFilesWizard");
+ cfgGroup.writeEntry("geometry", saveGeometry());
+ cfgGroup.sync();
}
void SignEncryptFilesWizard::setSigningPreset(bool preset)