/** * @brief MainWindow::on_updateButton_clicked */ void MainWindow::on_updateButton_clicked() { currentAction = GIT; if (usePass) { executePass("git pull"); } else { executeWrapper(gitExecutable, "pull"); } }
/** * @brief MainWindow::on_updateButton_clicked */ void MainWindow::on_updateButton_clicked() { ui->statusBar->showMessage(tr("Updating password-store"), 2000); currentAction = GIT; if (usePass) { executePass("git pull"); } else { executeWrapper(gitExecutable, "pull"); } }
/** * @brief MainWindow::on_treeView_clicked * @param index */ void MainWindow::on_treeView_clicked(const QModelIndex &index) { currentAction = GPG; if (model.fileInfo(index).isFile()){ QString passFile = model.filePath(index); if (usePass) { passFile.replace(".gpg", ""); passFile.replace(passStore, ""); executePass(passFile); } else { executeWrapper(gpgExecutable , "--no-tty -dq " + passFile); } } }
/** * @brief MainWindow::on_treeView_clicked * @param index */ void MainWindow::on_treeView_clicked(const QModelIndex &index) { currentAction = GPG; QString filePath = model.filePath(proxyModel.mapToSource(index)); QString passFile = filePath; passFile.replace(QRegExp("\\.gpg$"), ""); passFile.replace(QRegExp("^" + passStore), ""); if (model.fileInfo(proxyModel.mapToSource(index)).isFile()){ if (usePass) { executePass(passFile); } else { executeWrapper(gpgExecutable , "--no-tty -dq " + filePath); } } }
/** * @brief MainWindow::executePass * @param args */ void MainWindow::executePass(QString args) { executeWrapper(passExecutable, args); }