Skip to content
Commit 116e55a2 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

Handle adjacent special characters correctly

Summary:
The code handled sequences like '((' incorrectly, i.e. this was parsed as
a single opening quote, and thus could get operator association wrong.
Although only '>=' and '<=' have a special meaning, also accept '==' and
':=' as '=' resp. ':'.

BUG: 392620

Test Plan:
```
38: QDEBUG : AdvancedQueryParserTest::testNestedParentheses(a OR ((b AND c) AND d))   result term [ OR ( : a (QString)) [ AND ( : b (QString)) ( : c (QString)) ( : d (QString)) ] ]
38: QDEBUG : AdvancedQueryParserTest::testNestedParentheses(a OR ((b AND c) AND d)) expected term [ OR ( : a (QString)) [ AND ( : b (QString)) ( : c (QString)) ( : d (QString)) ] ]
38: PASS   : AdvancedQueryParserTest::testNestedParentheses(a OR ((b AND c) AND d))

```

Reviewers: #baloo, michaelh

Reviewed By: #baloo, michaelh

Subscribers: #frameworks

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D11888
parent 4e69ffea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment