Correct regression to ssh-agent from entry attachment refactor

This commit is contained in:
Jonathan White 2017-12-25 11:07:02 -05:00 committed by Janek Bevendorff
parent 497eb3c587
commit cc1ab94a4f
3 changed files with 29 additions and 6 deletions

View file

@ -106,6 +106,23 @@ void EntryAttachmentsWidget::setButtonsVisible(bool buttonsVisible)
emit buttonsVisibleChanged(m_buttonsVisible);
}
QByteArray EntryAttachmentsWidget::getAttachment(const QString &name)
{
return m_entryAttachments->value(name);
}
void EntryAttachmentsWidget::setAttachment(const QString &name, const QByteArray &value)
{
m_entryAttachments->set(name, value);
}
void EntryAttachmentsWidget::removeAttachment(const QString &name)
{
if (!isReadOnly() && m_entryAttachments->hasKey(name)) {
m_entryAttachments->remove(name);
}
}
void EntryAttachmentsWidget::insertAttachments()
{
Q_ASSERT(!isReadOnly());