mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-01-01 00:30:17 -05:00
reuse referenceRegExp
This commit is contained in:
parent
a03e354504
commit
40851409fb
3 changed files with 10 additions and 3 deletions
|
|
@ -28,6 +28,7 @@ const QString EntryAttributes::RememberCmdExecAttr = "_EXEC_CMD";
|
|||
|
||||
EntryAttributes::EntryAttributes(QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_referenceRegExp("\\{REF:([TUPAN])@I:([^}]+)\\}", Qt::CaseInsensitive, QRegExp::RegExp2)
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
|
@ -77,13 +78,17 @@ bool EntryAttributes::isReference(const QString& key) const
|
|||
}
|
||||
|
||||
QString data = value(key);
|
||||
QRegExp referenceRegExp("\\{REF:([TUPAN])@I:([^}]+)\\}", Qt::CaseInsensitive, QRegExp::RegExp2);
|
||||
if (referenceRegExp.indexIn(data) != -1) {
|
||||
if (m_referenceRegExp.indexIn(data) != -1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QRegExp EntryAttributes::referenceRegExp() const
|
||||
{
|
||||
return m_referenceRegExp;
|
||||
}
|
||||
|
||||
void EntryAttributes::set(const QString& key, const QString& value, bool protect)
|
||||
{
|
||||
bool emitModified = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue