summaryrefslogtreecommitdiffstats
path: root/mainwindow.cpp
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2015-07-16 22:58:29 +0200
committerAnne Jan Brouwer <annejan@noprotocol.com>2015-07-16 22:58:29 +0200
commit1df8083449dc8d0d63a600ace52a310e78e23fb4 (patch)
tree3ddcefb71dfb3dca536b27db0e35ad151fa1bb94 /mainwindow.cpp
parent22d00339a9f28589849e08e68492a2693150955e (diff)
pwgen boilerplating stuff
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r--mainwindow.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 3d769b73..004f0481 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -216,6 +216,11 @@ bool MainWindow::checkConfig() {
}
}
+ usePwgen = (settings.value("usePwgen") == "true");
+ useSymbols = (settings.value("useSymbols") == "true");
+ passwordLength = settings.value("passwordLength").toInt();
+ passwordChars = settings.value("passwordChars").toString();
+
useTrayIcon = settings.value("useTrayIcon").toBool();
hideOnClose = settings.value("hideOnClose").toBool();
@@ -319,6 +324,10 @@ void MainWindow::config() {
d->setProfiles(profiles, profile);
d->useGit(useGit);
d->setPwgenPath(pwgenExecutable);
+ d->usePwgen(usePwgen);
+ d->useSymbols(useSymbols);
+ d->setPasswordLength(passwordLength);
+ d->setPasswordChars(passwordChars);
d->wizard(); // does shit
if (d->exec()) {
@@ -339,6 +348,10 @@ void MainWindow::config() {
profiles = d->getProfiles();
useGit = d->useGit();
pwgenExecutable = d->getPwgenPath();
+ usePwgen = d->usePwgen();
+ useSymbols = d->useSymbols();
+ passwordLength = d->getPasswordLength();
+ passwordChars = d->getPasswordChars();
QSettings &settings(getSettings());
@@ -357,6 +370,10 @@ void MainWindow::config() {
settings.setValue("hideOnClose", hideOnClose ? "true" : "false");
settings.setValue("useGit", useGit ? "true" : "false");
settings.setValue("pwgenExecutable", pwgenExecutable);
+ settings.setValue("usePwgen", usePwgen ? "true" : "false");
+ settings.setValue("useGit", useSymbols ? "useSymbols" : "false");
+ settings.setValue("passwordLength", passwordLength);
+ settings.setValue("passwordChars", passwordChars);
if (!profiles.isEmpty()) {
settings.beginGroup("profiles");