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

@ -20,6 +20,7 @@
#define KEEPASSX_DATABASEWIDGET_H
#include <QFileSystemWatcher>
#include <QListView>
#include <QStackedWidget>
#include "DatabaseOpenDialog.h"
@ -117,10 +118,8 @@ public:
QByteArray entryViewState() const;
bool setEntryViewState(const QByteArray& state) const;
QList<int> mainSplitterSizes() const;
void setMainSplitterSizes(const QList<int>& sizes);
QList<int> previewSplitterSizes() const;
void setPreviewSplitterSizes(const QList<int>& sizes);
QHash<Config::ConfigKey, QList<int>> splitterSizes() const;
void setSplitterSizes(const QHash<Config::ConfigKey, QList<int>>& sizes);
void setSearchStringForAutoType(const QString& search);
signals:
@ -148,11 +147,11 @@ signals:
void listModeActivated();
void searchModeAboutToActivate();
void searchModeActivated();
void mainSplitterSizesChanged();
void previewSplitterSizesChanged();
void splitterSizesChanged();
void entryViewStateChanged();
void clearSearch();
void requestGlobalAutoType(const QString& search);
void requestSearch(const QString& search);
public slots:
bool lock();
@ -176,6 +175,7 @@ public slots:
void copyURL();
void copyNotes();
void copyAttribute(QAction* action);
void filterByTag(const QModelIndex& index);
void showTotp();
void showTotpKeyQrCode();
void copyTotp();
@ -267,6 +267,7 @@ private:
QPointer<QWidget> m_mainWidget;
QPointer<QSplitter> m_mainSplitter;
QPointer<QSplitter> m_groupSplitter;
QPointer<MessageWidget> m_messageWidget;
QPointer<EntryPreviewWidget> m_previewView;
QPointer<QSplitter> m_previewSplitter;
@ -282,6 +283,7 @@ private:
QPointer<KeePass1OpenWidget> m_keepass1OpenWidget;
QPointer<OpVaultOpenWidget> m_opVaultOpenWidget;
QPointer<GroupView> m_groupView;
QPointer<QListView> m_tagView;
QPointer<EntryView> m_entryView;
QScopedPointer<Group> m_newGroup;