fix #218 custom attribute like KeePass interface

This commit is contained in:
thez3ro 2017-02-08 01:04:05 +01:00
parent 7db7747cb0
commit 8408e7fdb4
No known key found for this signature in database
GPG Key ID: F628F9E41DD7C073

View File

@ -646,12 +646,17 @@ QString Entry::resolvePlaceholder(const QString& str) const
const QList<QString> keyList = attributes()->keys();
for (const QString& key : keyList) {
Qt::CaseSensitivity cs = Qt::CaseInsensitive;
QString k = key;
if (!EntryAttributes::isDefaultAttribute(key)) {
cs = Qt::CaseSensitive;
k.prepend("{S:");
} else {
k.prepend("{");
}
QString k = key;
k.prepend("{").append("}");
k.append("}");
if (result.compare(k,cs)==0) {
result.replace(result,attributes()->value(key));
break;