Allow $param(name = value) for consistency with other query conditions

This commit is contained in:
baldurk
2021-07-01 15:15:03 +01:00
parent ca3e3afa66
commit 34cf40f13e
+9 -3
View File
@@ -1680,7 +1680,8 @@ with //s. The syntax is perl-like and supports perl compatible options after the
QString filterDescription_param() const
{
return tr(R"EOD(
$param(name: value) - passes if a given parameter matches a value.
$param(name: value)
$param(name = value) - passes if a given parameter matches a value.
This filter searches through the parameters to each API call to find a matching name. The name is
specified case-sensitive and can be at any nesting level. The value is searched for as a
@@ -1695,9 +1696,13 @@ case-insensitive substring.
// $param() => check for a named parameter having a particular value
int idx = parameters.indexOf(QLatin1Char(':'));
if(idx < 0)
idx = parameters.indexOf(QLatin1Char('='));
if(idx < 0)
{
trace.setError(tr("Parameter to to $param() should be name: value", "EventFilterModel"));
trace.setError(
tr("Parameter to to $param() should be name: value or name = value", "EventFilterModel"));
return NULL;
}
@@ -1706,7 +1711,8 @@ case-insensitive substring.
if(paramValue.isEmpty())
{
trace.setError(tr("Parameter to to $param() should be name: value", "EventFilterModel"));
trace.setError(
tr("Parameter to to $param() should be name: value or name = value", "EventFilterModel"));
return NULL;
}