Drop entries from search results when moved to the recycle bin.

This commit is contained in:
Felix Geyer 2013-10-08 21:13:20 +02:00
parent 67338aac7b
commit 8778df5789

View File

@ -23,6 +23,7 @@
#include "core/DatabaseIcons.h"
#include "core/Entry.h"
#include "core/Group.h"
#include "core/Metadata.h"
EntryModel::EntryModel(QObject* parent)
: QAbstractTableModel(parent)
@ -85,6 +86,9 @@ void EntryModel::setEntryList(const QList<Entry*>& entries)
Q_FOREACH (Database* db, databases) {
Q_ASSERT(db);
m_allGroups.append(db->rootGroup()->groupsRecursive(true));
if (db->metadata()->recycleBin()) {
m_allGroups.removeOne(db->metadata()->recycleBin());
}
}
Q_FOREACH (const Group* group, m_allGroups) {