mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-19 22:42:23 -05:00
Rename addAttribute() to setAttribute() and addAttachment() to setAttachment().
This commit is contained in:
parent
40e96ad7b3
commit
e397080d79
4 changed files with 13 additions and 13 deletions
|
|
@ -34,7 +34,7 @@ Entry::Entry()
|
||||||
m_autoTypeObfuscation = 0;
|
m_autoTypeObfuscation = 0;
|
||||||
|
|
||||||
Q_FOREACH (const QString& key, m_defaultAttibutes) {
|
Q_FOREACH (const QString& key, m_defaultAttibutes) {
|
||||||
addAttribute(key, "");
|
setAttribute(key, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -252,7 +252,7 @@ void Entry::addAutoTypeAssociation(const AutoTypeAssociation& assoc)
|
||||||
m_autoTypeAssociations << assoc;
|
m_autoTypeAssociations << assoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::addAttribute(const QString& key, const QString& value, bool protect)
|
void Entry::setAttribute(const QString& key, const QString& value, bool protect)
|
||||||
{
|
{
|
||||||
m_attributes.insert(key, value);
|
m_attributes.insert(key, value);
|
||||||
if (protect) {
|
if (protect) {
|
||||||
|
|
@ -272,7 +272,7 @@ void Entry::removeAttribute(const QString& key)
|
||||||
m_protectedAttributes.remove(key);
|
m_protectedAttributes.remove(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::addAttachment(const QString& key, const QByteArray& value, bool protect)
|
void Entry::setAttachment(const QString& key, const QByteArray& value, bool protect)
|
||||||
{
|
{
|
||||||
m_binaries.insert(key, value);
|
m_binaries.insert(key, value);
|
||||||
if (protect) {
|
if (protect) {
|
||||||
|
|
@ -288,27 +288,27 @@ void Entry::removeAttachment(const QString& key)
|
||||||
|
|
||||||
void Entry::setTitle(const QString& title)
|
void Entry::setTitle(const QString& title)
|
||||||
{
|
{
|
||||||
addAttribute("Title", title);
|
setAttribute("Title", title);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::setUrl(const QString& url)
|
void Entry::setUrl(const QString& url)
|
||||||
{
|
{
|
||||||
addAttribute("URL", url);
|
setAttribute("URL", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::setUsername(const QString& username)
|
void Entry::setUsername(const QString& username)
|
||||||
{
|
{
|
||||||
addAttribute("UserName", username);
|
setAttribute("UserName", username);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::setPassword(const QString& password)
|
void Entry::setPassword(const QString& password)
|
||||||
{
|
{
|
||||||
addAttribute("Password", password);
|
setAttribute("Password", password);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::setNotes(const QString& notes)
|
void Entry::setNotes(const QString& notes)
|
||||||
{
|
{
|
||||||
addAttribute("Notes", notes);
|
setAttribute("Notes", notes);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Entry*> Entry::historyItems()
|
QList<Entry*> Entry::historyItems()
|
||||||
|
|
|
||||||
|
|
@ -82,9 +82,9 @@ public:
|
||||||
void setAutoTypeObfuscation(int obfuscation);
|
void setAutoTypeObfuscation(int obfuscation);
|
||||||
void setDefaultAutoTypeSequence(const QString& sequence);
|
void setDefaultAutoTypeSequence(const QString& sequence);
|
||||||
void addAutoTypeAssociation(const AutoTypeAssociation& assoc);
|
void addAutoTypeAssociation(const AutoTypeAssociation& assoc);
|
||||||
void addAttribute(const QString& key, const QString& value, bool protect = false);
|
void setAttribute(const QString& key, const QString& value, bool protect = false);
|
||||||
void removeAttribute(const QString& key);
|
void removeAttribute(const QString& key);
|
||||||
void addAttachment(const QString& key, const QByteArray& value, bool protect = false);
|
void setAttachment(const QString& key, const QByteArray& value, bool protect = false);
|
||||||
void removeAttachment(const QString& key);
|
void removeAttachment(const QString& key);
|
||||||
void setTitle(const QString& title);
|
void setTitle(const QString& title);
|
||||||
void setUrl(const QString& url);
|
void setUrl(const QString& url);
|
||||||
|
|
|
||||||
|
|
@ -537,7 +537,7 @@ void KeePass2XmlReader::parseEntryString(Entry *entry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
entry->addAttribute(key, value, isProtected);
|
entry->setAttribute(key, value, isProtected);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipCurrentElement();
|
skipCurrentElement();
|
||||||
|
|
@ -564,7 +564,7 @@ void KeePass2XmlReader::parseEntryBinary(Entry *entry)
|
||||||
m_randomStream->processInPlace(value);
|
m_randomStream->processInPlace(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
entry->addAttachment(key, value, isProtected);
|
entry->setAttachment(key, value, isProtected);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipCurrentElement();
|
skipCurrentElement();
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ void TestKeePass2Writer::initTestCase()
|
||||||
group->setUuid(Uuid::random());
|
group->setUuid(Uuid::random());
|
||||||
Entry* entry = new Entry();
|
Entry* entry = new Entry();
|
||||||
entry->setUuid(Uuid::random());
|
entry->setUuid(Uuid::random());
|
||||||
entry->addAttribute("test", "protectedTest", true);
|
entry->setAttribute("test", "protectedTest", true);
|
||||||
QVERIFY(entry->isAttributeProtected("test"));
|
QVERIFY(entry->isAttributeProtected("test"));
|
||||||
entry->setGroup(group);
|
entry->setGroup(group);
|
||||||
Group* groupNew = new Group();
|
Group* groupNew = new Group();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue