1
0
mirror of https://github.com/QRouland/UTPass.git synced 2026-01-10 03:26:57 +00:00

Fix rnp passphrase provider version

This commit is contained in:
2025-02-03 18:45:25 +01:00
parent 93361f9ba5
commit e56c16f27b
9 changed files with 221 additions and 301 deletions

View File

@@ -6,8 +6,7 @@
#include "jobs/getkeysjob.h"
#include "jobs/importkeyjob.h"
#include "pass.h"
#include "passphraseprovider2.h"
//#include "passphraseprovider2.h"
#include "passphraseprovider.h"
@@ -18,12 +17,15 @@ Pass::Pass():
QStandardPaths::AppDataLocation).append("/.rnp")),
m_passphrase_provider(&UTPassphraseProvider::get_pass_provider),
m_sem(std::unique_ptr<QSemaphore>(new QSemaphore(1)))
{}
void Pass::initialize(QObject *window)
{
this->initGpgHome();
this->initPasswordStore();
QObject::connect(this, &Pass::responsePassphraseDialogPropagate,
&UTPassphraseProvider::instance(), &UTPassphraseProvider::handleResponse);
}
void Pass::initialize(QObject *window)
{
if (!window) {
qWarning("[Pass] Window should be null only for testing");
} else {
@@ -202,8 +204,8 @@ void Pass::slotGetAllGPGKeysSucceed(QList<QJsonDocument> result)
this->m_sem->release(1);
}
// void Pass::responsePassphraseDialog(bool cancel, QString passphrase)
// {
// qDebug() << "Propagate responsePassphraseDialog";
// emit responsePassphraseDialogPropagate(cancel, passphrase);
// }
void Pass::responsePassphraseDialog(bool cancel, QString passphrase)
{
qDebug() << "Propagate responsePassphraseDialog";
emit responsePassphraseDialogPropagate(cancel, passphrase);
}