From 34cf40f13ec250140aee10ba074ab18c1619b899 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 9 Jun 2021 23:09:33 +0100 Subject: [PATCH] Allow $param(name = value) for consistency with other query conditions --- qrenderdoc/Windows/EventBrowser.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qrenderdoc/Windows/EventBrowser.cpp b/qrenderdoc/Windows/EventBrowser.cpp index 0ad41df79..6ba00a786 100644 --- a/qrenderdoc/Windows/EventBrowser.cpp +++ b/qrenderdoc/Windows/EventBrowser.cpp @@ -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; }