fix regex for placeholders, fix #402, add regression test

This commit is contained in:
thez3ro 2017-03-16 20:31:14 +01:00
parent 4cccf28b4d
commit e3602e3c75
No known key found for this signature in database
GPG key ID: F628F9E41DD7C073
5 changed files with 59 additions and 13 deletions

View file

@ -649,7 +649,8 @@ const Database* Entry::database() const
QString Entry::resolveMultiplePlaceholders(const QString& str) const
{
QString result = str;
QRegExp tmplRegEx("({.*})", Qt::CaseInsensitive, QRegExp::RegExp2);
QRegExp tmplRegEx("(\\{.*\\})", Qt::CaseInsensitive, QRegExp::RegExp2);
tmplRegEx.setMinimal(true);
QStringList tmplList;
int pos = 0;