Diffusion Baloo 116e55a2076e

Handle adjacent special characters correctly

Authored by bruns on Apr 1 2018, 11:29 PM.

Description

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

Details

Committed
brunsApr 8 2018, 3:41 PM
Reviewer
Baloo
Differential Revision
D11888: Handle adjacent special characters correctly
Parents
R293:4e69ffeab75f: Add test case for parsing of double opening '(('
Branches
Unknown
Tags
Unknown