Add tags feature

* show the tags in the entry preview
* allow searching by tag
* add a sidebar listing the tags in the database
* filter entries by tag on click
* Introduce a new TagsEdit widget that provides pill aesthetics, fast removal functionality and autocompletion
* add tests for the tags feature
* introduce the "is" tag for searching. Support for weak passwords and expired added.
This commit is contained in:
Xavier Valls 2022-01-23 10:00:48 -05:00 committed by Jonathan White
parent 56a1b465a1
commit 4a21cee98c
33 changed files with 1541 additions and 73 deletions

View file

@ -190,6 +190,12 @@ QString Entry::tags() const
return m_data.tags;
}
QStringList Entry::tagList() const
{
static QRegExp rx("(\\ |\\,|\\.|\\:|\\t|\\;)");
return tags().split(rx, QString::SkipEmptyParts);
}
const TimeInfo& Entry::timeInfo() const
{
return m_data.timeInfo;
@ -210,7 +216,7 @@ QString Entry::defaultAutoTypeSequence() const
return m_data.defaultAutoTypeSequence;
}
const QSharedPointer<PasswordHealth>& Entry::passwordHealth()
const QSharedPointer<PasswordHealth> Entry::passwordHealth()
{
if (!m_data.passwordHealth) {
m_data.passwordHealth.reset(new PasswordHealth(resolvePlaceholder(password())));
@ -218,6 +224,14 @@ const QSharedPointer<PasswordHealth>& Entry::passwordHealth()
return m_data.passwordHealth;
}
const QSharedPointer<PasswordHealth> Entry::passwordHealth() const
{
if (!m_data.passwordHealth) {
return QSharedPointer<PasswordHealth>::create(resolvePlaceholder(password()));
}
return m_data.passwordHealth;
}
bool Entry::excludeFromReports() const
{
return m_data.excludeFromReports