diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-07-17 23:40:44 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2015-07-17 23:40:44 +0200 |
commit | 710d3e550f8ad069119201c54c0dc5fc767e665f (patch) | |
tree | 1ca3cb427f6480749e925e6226d57feba214f243 /mainwindow.cpp | |
parent | 21b72a4d7c3ce3cab16e8bea0c727e05a31849c1 (diff) |
rename to clear up, remove empty profiles
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r-- | mainwindow.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index b1e0a502..7397dbf2 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -41,7 +41,7 @@ MainWindow::MainWindow(QWidget *parent) : wrapperRunning = false; execQueue = new QQueue<execQueueItem>; ui->statusBar->showMessage(tr("Welcome to QtPass %1").arg(VERSION), 2000); - firstRun = true; + freshStart = true; startupPhase = true; if (!checkConfig()) { // no working config @@ -139,7 +139,7 @@ bool MainWindow::checkConfig() { QString version = settings.value("version").toString(); - if (firstRun) { + if (freshStart) { settings.beginGroup( "mainwindow" ); restoreGeometry(settings.value( "geometry", saveGeometry() ).toByteArray()); restoreState(settings.value( "savestate", saveState() ).toByteArray()); @@ -213,7 +213,7 @@ bool MainWindow::checkConfig() { if (Util::checkConfig(passStore, passExecutable, gpgExecutable)) { config(); - if (firstRun && Util::checkConfig(passStore, passExecutable, gpgExecutable)) { + if (freshStart && Util::checkConfig(passStore, passExecutable, gpgExecutable)) { return false; } } @@ -245,17 +245,17 @@ bool MainWindow::checkConfig() { } else { usePwgen = false; } - } else { + } /*else { QStringList ver = version.split("."); qDebug() << ver; if (ver[0] == "0" && ver[1] == "8") { // upgrade to 0.9 } - } + }*/ settings.setValue("version", VERSION); - firstRun = false; + freshStart = false; // TODO: this needs to be before we try to access the store, // but it would be better to do it after the Window is shown, @@ -331,7 +331,7 @@ void MainWindow::config() { d->setModal(true); // Automatically default to pass if it's available - usePass = firstRun ? QFile(passExecutable).exists() : usePass; + usePass = freshStart ? QFile(passExecutable).exists() : usePass; d->setPassPath(passExecutable); d->setGitPath(gitExecutable); @@ -425,7 +425,7 @@ void MainWindow::config() { updateProfileBox(); ui->treeView->setRootIndex(proxyModel.mapFromSource(model.setRootPath(passStore))); - if (firstRun && Util::checkConfig(passStore, passExecutable, gpgExecutable)) { + if (freshStart && Util::checkConfig(passStore, passExecutable, gpgExecutable)) { config(); } updateEnv(); @@ -443,7 +443,7 @@ void MainWindow::config() { destroyTrayIcon(); } } - firstRun = false; + freshStart = false; } } |