Skip to content

Commit

Permalink
Allow references in part of a field
Browse files Browse the repository at this point in the history
When a field value is of the form ...{REF:...}...
Then:

* Auto-type does not work with that field
* References to this field are not properly resolved

This commit fixes both issues.
  • Loading branch information
Benoit Mortgat authored and TheZ3ro committed Mar 5, 2018
1 parent 5f9f276 commit 1862861
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/Entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,27 +801,27 @@ QString Entry::resolvePlaceholderRecursive(const QString& placeholder, int maxDe
if (placeholderType(title()) == PlaceholderType::Title) {
return title();
}
return resolvePlaceholderRecursive(title(), maxDepth - 1);
return resolveMultiplePlaceholdersRecursive(title(), maxDepth - 1);
case PlaceholderType::UserName:
if (placeholderType(username()) == PlaceholderType::UserName) {
return username();
}
return resolvePlaceholderRecursive(username(), maxDepth - 1);
return resolveMultiplePlaceholdersRecursive(username(), maxDepth - 1);
case PlaceholderType::Password:
if (placeholderType(password()) == PlaceholderType::Password) {
return password();
}
return resolvePlaceholderRecursive(password(), maxDepth - 1);
return resolveMultiplePlaceholdersRecursive(password(), maxDepth - 1);
case PlaceholderType::Notes:
if (placeholderType(notes()) == PlaceholderType::Notes) {
return notes();
}
return resolvePlaceholderRecursive(notes(), maxDepth - 1);
return resolveMultiplePlaceholdersRecursive(notes(), maxDepth - 1);
case PlaceholderType::Url:
if (placeholderType(url()) == PlaceholderType::Url) {
return url();
}
return resolvePlaceholderRecursive(url(), maxDepth - 1);
return resolveMultiplePlaceholdersRecursive(url(), maxDepth - 1);
case PlaceholderType::UrlWithoutScheme:
case PlaceholderType::UrlScheme:
case PlaceholderType::UrlHost:
Expand Down

0 comments on commit 1862861

Please sign in to comment.