diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-07-18 01:23:33 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2015-07-18 01:23:33 +0200 |
commit | 8c4ccb9a0a061052cc58f7d1d701fbbc1d490b95 (patch) | |
tree | 1d05656be27cb184027e1a18aa52447f0cc5842a | |
parent | fc9f519cd6112614026498d79244d57b500bd3a6 (diff) |
wizard flow fix
-rw-r--r-- | dialog.cpp | 2 | ||||
-rw-r--r-- | mainwindow.cpp | 17 |
2 files changed, 10 insertions, 9 deletions
@@ -490,7 +490,7 @@ void Dialog::wizard() QString passStore = ui->storePath->text(); - if (clean && !QFile(passStore).exists()) { + if (!QFile(passStore).exists()) { // TODO pass version? if (QMessageBox::question(this, tr("Create password-store?"), tr("Would you like to create a password-store at %1?").arg(passStore), diff --git a/mainwindow.cpp b/mainwindow.cpp index 7397dbf2..25d5e5ac 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -210,14 +210,6 @@ bool MainWindow::checkConfig() { settings.endGroup(); useGit = (settings.value("useGit") == "true"); - - if (Util::checkConfig(passStore, passExecutable, gpgExecutable)) { - config(); - if (freshStart && Util::checkConfig(passStore, passExecutable, gpgExecutable)) { - return false; - } - } - usePwgen = (settings.value("usePwgen") == "true"); useSymbols = (settings.value("useSymbols") == "true"); passwordLength = settings.value("passwordLength").toInt(); @@ -232,6 +224,8 @@ bool MainWindow::checkConfig() { destroyTrayIcon(); } + //qDebug() << version; + // Config updates if (version.isEmpty()) { qDebug() << "assuming fresh install"; @@ -255,6 +249,13 @@ bool MainWindow::checkConfig() { settings.setValue("version", VERSION); + if (Util::checkConfig(passStore, passExecutable, gpgExecutable)) { + config(); + if (freshStart && Util::checkConfig(passStore, passExecutable, gpgExecutable)) { + return false; + } + } + freshStart = false; // TODO: this needs to be before we try to access the store, |