示例#1
0
/**
 * @brief MainWindow::on_updateButton_clicked
 */
void MainWindow::on_updateButton_clicked()
{
    currentAction = GIT;
    if (usePass) {
        executePass("git pull");
    } else {
        executeWrapper(gitExecutable, "pull");
    }
}
示例#2
0
/**
 * @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");
    }
}
示例#3
0
/**
 * @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);
        }
    }
}
示例#4
0
/**
 * @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);
        }
    }
}
示例#5
0
/**
 * @brief MainWindow::executePass
 * @param args
 */
void MainWindow::executePass(QString args) {
    executeWrapper(passExecutable, args);
}