mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-31 16:20:22 -05:00
Implement review feedback
This commit is contained in:
parent
bea31f9bcc
commit
0ca7fd369a
14 changed files with 59 additions and 65 deletions
|
|
@ -76,7 +76,7 @@ int Remove::removeEntry(Database* database, const QString& databasePath, const Q
|
|||
QTextStream out(Utils::STDOUT, QIODevice::WriteOnly);
|
||||
QTextStream err(Utils::STDERR, QIODevice::WriteOnly);
|
||||
|
||||
Entry* entry = database->rootGroup()->findEntryByPath(entryPath);
|
||||
QPointer<Entry> entry = database->rootGroup()->findEntryByPath(entryPath);
|
||||
if (!entry) {
|
||||
err << QObject::tr("Entry %1 not found.").arg(entryPath) << endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
@ -84,7 +84,8 @@ int Remove::removeEntry(Database* database, const QString& databasePath, const Q
|
|||
|
||||
QString entryTitle = entry->title();
|
||||
bool recycled = true;
|
||||
if (Tools::hasChild(database->metadata()->recycleBin(), entry) || !database->metadata()->recycleBinEnabled()) {
|
||||
auto* recycleBin = database->metadata()->recycleBin();
|
||||
if (!database->metadata()->recycleBinEnabled() || (recycleBin && recycleBin->findEntryByUuid(entry->uuid()))) {
|
||||
delete entry;
|
||||
recycled = false;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue