Skip to content

Commit

Permalink
randomfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
annejan committed May 27, 2015
1 parent cbb5027 commit 45b7744
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "keygendialog.h"
#include <QDebug>
#include <QMessageBox>
#include <QDir>

/**
* @brief Dialog::Dialog
Expand Down Expand Up @@ -164,6 +165,7 @@ QString Dialog::selectExecutable() {
QString Dialog::selectFolder() {
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::Directory);
dialog.setFilter(QDir::NoFilter);
dialog.setOption(QFileDialog::ShowDirsOnly);
if (dialog.exec()) {
return dialog.selectedFiles().first();
Expand Down Expand Up @@ -386,6 +388,7 @@ void Dialog::wizard()
tr("The folder %1 doesn't seem to be a password store or is not yet initialised.").arg(passStore));
while(!QFile(passStore).exists()) {
on_toolButtonStore_clicked();
passStore = ui->storePath->text();
}
if (!QFile(passStore + ".gpg-id").exists()) {
// apears not to be store
Expand Down
4 changes: 2 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ void MainWindow::config() {
settings.setValue("hideContent", hideContent ? "true" : "false");
settings.setValue("addGPGId", addGPGId ? "true" : "false");

ui->treeView->setRootIndex(model.setRootPath(passStore));
ui->treeView->setRootIndex(proxyModel.mapFromSource(model.setRootPath(passStore)));

if (firstRun && Util::checkConfig(passStore, passExecutable, gpgExecutable)) {
config(); // loop !!
config();
}
updateEnv();
}
Expand Down

0 comments on commit 45b7744

Please sign in to comment.