mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Correct test failures; moved gui calls into gui objects
This commit is contained in:
parent
fd71b4a22e
commit
77e345570d
@ -29,7 +29,6 @@
|
|||||||
#include "core/Global.h"
|
#include "core/Global.h"
|
||||||
#include "core/Group.h"
|
#include "core/Group.h"
|
||||||
#include "core/Metadata.h"
|
#include "core/Metadata.h"
|
||||||
#include "core/FilePath.h"
|
|
||||||
|
|
||||||
// String being displayed when hiding content
|
// String being displayed when hiding content
|
||||||
const QString EntryModel::HiddenContentDisplay(QString("\u25cf").repeated(6));
|
const QString EntryModel::HiddenContentDisplay(QString("\u25cf").repeated(6));
|
||||||
@ -42,12 +41,9 @@ EntryModel::EntryModel(QObject* parent)
|
|||||||
, m_group(nullptr)
|
, m_group(nullptr)
|
||||||
, m_hideUsernames(false)
|
, m_hideUsernames(false)
|
||||||
, m_hidePasswords(true)
|
, m_hidePasswords(true)
|
||||||
, m_paperClipPixmap(FilePath::instance()->icon("actions", "paperclip").pixmap(16))
|
, m_paperClipPixmap(16, 16)
|
||||||
, m_paperClipPixmapCentered(24, 16)
|
, m_paperClipPixmapCentered(24, 16)
|
||||||
{
|
{
|
||||||
m_paperClipPixmapCentered.fill(Qt::transparent);
|
|
||||||
QPainter painter(&m_paperClipPixmapCentered);
|
|
||||||
painter.drawPixmap(8, 0, m_paperClipPixmap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Entry* EntryModel::entryFromIndex(const QModelIndex& index) const
|
Entry* EntryModel::entryFromIndex(const QModelIndex& index) const
|
||||||
@ -504,3 +500,12 @@ void EntryModel::togglePasswordsHidden(const bool hide)
|
|||||||
{
|
{
|
||||||
setPasswordsHidden(hide);
|
setPasswordsHidden(hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EntryModel::setPaperClipPixmap(const QPixmap& paperclip)
|
||||||
|
{
|
||||||
|
m_paperClipPixmap = paperclip;
|
||||||
|
|
||||||
|
m_paperClipPixmapCentered.fill(Qt::transparent);
|
||||||
|
QPainter painter2(&m_paperClipPixmapCentered);
|
||||||
|
painter2.drawPixmap(8, 0, paperclip);
|
||||||
|
}
|
||||||
|
@ -66,6 +66,8 @@ public:
|
|||||||
bool isPasswordsHidden() const;
|
bool isPasswordsHidden() const;
|
||||||
void setPasswordsHidden(const bool hide);
|
void setPasswordsHidden(const bool hide);
|
||||||
|
|
||||||
|
void setPaperClipPixmap(const QPixmap& paperclip);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void switchedToListMode();
|
void switchedToListMode();
|
||||||
void switchedToSearchMode();
|
void switchedToSearchMode();
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
|
#include "core/FilePath.h"
|
||||||
#include "gui/SortFilterHideProxyModel.h"
|
#include "gui/SortFilterHideProxyModel.h"
|
||||||
|
|
||||||
EntryView::EntryView(QWidget* parent)
|
EntryView::EntryView(QWidget* parent)
|
||||||
@ -114,6 +115,8 @@ EntryView::EntryView(QWidget* parent)
|
|||||||
m_sortModel->sort(EntryModel::Title, Qt::AscendingOrder);
|
m_sortModel->sort(EntryModel::Title, Qt::AscendingOrder);
|
||||||
sortByColumn(EntryModel::Title, Qt::AscendingOrder);
|
sortByColumn(EntryModel::Title, Qt::AscendingOrder);
|
||||||
m_defaultListViewState = header()->saveState();
|
m_defaultListViewState = header()->saveState();
|
||||||
|
|
||||||
|
m_model->setPaperClipPixmap(filePath()->icon("actions", "paperclip").pixmap(16));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryView::keyPressEvent(QKeyEvent* event)
|
void EntryView::keyPressEvent(QKeyEvent* event)
|
||||||
|
Loading…
Reference in New Issue
Block a user