mirror of
https://github.com/QRouland/UTPass.git
synced 2025-07-04 03:02:28 +00:00
Refactor unzip password store
This commit is contained in:
@ -24,7 +24,7 @@ signals:
|
||||
/**
|
||||
* @brief Signal emitted when the rm operation is complete.
|
||||
*
|
||||
* @param err A boolean indicating whether an error occurred during cloning.
|
||||
* @param err A boolean indicating whether an error occurred during removing.
|
||||
* `true` if an error occurred, `false` if the clone was successful.
|
||||
*/
|
||||
void resultReady(const bool err);
|
||||
|
@ -71,6 +71,9 @@ void Pass::showResult(Error err, QString plain_text)
|
||||
|
||||
bool Pass::deletePasswordStore()
|
||||
{
|
||||
if (!this->m_sem->tryAcquire(1, 500)) {
|
||||
return false;
|
||||
}
|
||||
qInfo() << "Pass delete Password Store";
|
||||
auto job = new RmJob(this->password_store());
|
||||
qDebug() << "Delete Password Store at " << this->password_store();
|
||||
@ -82,6 +85,7 @@ bool Pass::deletePasswordStore()
|
||||
|
||||
void Pass::deletePasswordStoreResult(bool err)
|
||||
{
|
||||
|
||||
qDebug() << "Pass delete Password StoreResult";
|
||||
if (err) { //dir.removeRecursively()) {
|
||||
qInfo() << "Pass delete Password Store Failed";
|
||||
@ -91,6 +95,7 @@ void Pass::deletePasswordStoreResult(bool err)
|
||||
qInfo() << "Pass delete Password Store Succeed";
|
||||
emit deletePasswordStoreSucceed();
|
||||
}
|
||||
this->m_sem->release(1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,7 +137,7 @@ private:
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Constructs the Pass object and initializes necessary resources.
|
||||
* @brief Constructs the Pass object.
|
||||
*/
|
||||
Pass();
|
||||
|
||||
|
Reference in New Issue
Block a user