mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-27 01:56:32 -05:00
parent
3df2ad35cb
commit
e026f3d1eb
9 changed files with 224 additions and 74 deletions
|
|
@ -73,22 +73,6 @@ void EntryAttachments::remove(const QString& key)
|
|||
Q_EMIT modified();
|
||||
}
|
||||
|
||||
void EntryAttachments::copyFrom(const EntryAttachments* other)
|
||||
{
|
||||
if (*this != *other) {
|
||||
Q_EMIT aboutToBeReset();
|
||||
|
||||
m_attachments.clear();
|
||||
|
||||
Q_FOREACH (const QString& key, other->keys()) {
|
||||
m_attachments.insert(key, other->value(key));
|
||||
}
|
||||
|
||||
Q_EMIT reset();
|
||||
Q_EMIT modified();
|
||||
}
|
||||
}
|
||||
|
||||
void EntryAttachments::clear()
|
||||
{
|
||||
if (m_attachments.isEmpty()) {
|
||||
|
|
@ -103,7 +87,26 @@ void EntryAttachments::clear()
|
|||
Q_EMIT modified();
|
||||
}
|
||||
|
||||
bool EntryAttachments::operator==(const EntryAttachments& other) const
|
||||
{
|
||||
return m_attachments == other.m_attachments;
|
||||
}
|
||||
|
||||
bool EntryAttachments::operator!=(const EntryAttachments& other) const
|
||||
{
|
||||
return m_attachments != other.m_attachments;
|
||||
}
|
||||
|
||||
EntryAttachments& EntryAttachments::operator=(EntryAttachments& other)
|
||||
{
|
||||
if (*this != other) {
|
||||
Q_EMIT aboutToBeReset();
|
||||
|
||||
m_attachments = other.m_attachments;
|
||||
|
||||
Q_EMIT reset();
|
||||
Q_EMIT modified();
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue