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

Add delete password store feature

This commit is contained in:
2025-01-20 14:46:47 +01:00
parent 0eb8920856
commit ebfc6f500d
15 changed files with 329 additions and 65 deletions

View File

@@ -0,0 +1,24 @@
#include "rmjob.h"
RmJob::RmJob(QString path):
m_path(path)
{
this->setObjectName("RmJob");
}
void RmJob::run()
{
auto info = QFileInfo(this->m_path);
if (info.isFile()) {
auto file = QFile(this->m_path);
file.remove();
emit resultReady(false);
} else if (info.isDir()) {
auto dir = QDir(this->m_path);
dir.removeRecursively();
emit resultReady(false);
} else {
emit resultReady(true);
}
}