Skip to content

Commit

Permalink
fixup! TEST check whether that fixes the now broken TextFilterNode tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Oct 10, 2023
1 parent 9173305 commit 31f95ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/library/searchqueryparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,20 @@ SearchQueryParser::TextArgumentResult SearchQueryParser::getTextArgument(QString
}
}
StringMatch mode = StringMatch::Contains;
bool equalRequested = false;
if (argument.startsWith("=")) {
// strip the '=' from the argument
argument = argument.mid(1);
// TODO(ronso0) disabled to check whether that's breaking the TextFilterNode tests
// mode = StringMatch::Equals;
// TODO(ronso0) should 'tag:"string"' really be equal to 'tag:="string"?
mode = StringMatch::Equals;
equalRequested = true;
}
if (argument.startsWith("\"")) {
Quoted quoted;
std::tie(argument, quoted) = consumeQuotedArgument(argument, tokens);
mode = quoted == Quoted::Complete ? StringMatch::Equals : StringMatch::Contains;
mode = equalRequested && quoted == Quoted::Complete
? StringMatch::Equals
: StringMatch::Contains;
}
return {argument, mode};
}
Expand Down

0 comments on commit 31f95ef

Please sign in to comment.