From 821bed67063bbf957af82cb3890b304cf800772d Mon Sep 17 00:00:00 2001 From: Albert S Date: Sat, 4 Jun 2022 22:01:33 +0200 Subject: [PATCH] shared: LooqsQuery: Add 'p', 'pb', 'pe' aliases Because this way the user has to type significantly less --- shared/looqsquery.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/looqsquery.cpp b/shared/looqsquery.cpp index eaf647f..c702014 100644 --- a/shared/looqsquery.cpp +++ b/shared/looqsquery.cpp @@ -270,15 +270,15 @@ LooqsQuery LooqsQuery::build(QString expression, TokenType loneWordsTokenType, b throw LooqsGeneralException("value cannot be empty for filters"); } - if(filtername == "path.contains") + if(filtername == "p" || filtername == "path.contains") { tokenType = FILTER_PATH_CONTAINS; } - else if(filtername == "path.starts") + else if(filtername == "pb" || filtername == "path.starts") { tokenType = FILTER_PATH_STARTS; } - else if(filtername == "path.ends") + else if(filtername == "pe" || filtername == "path.ends") { tokenType = FILTER_PATH_ENDS; }