shared: LooqsQuery: build(): Return empty query for empty expresion
This commit is contained in:
parent
49e408be50
commit
7d9c883abd
@ -169,6 +169,10 @@ void LooqsQuery::addToken(Token t)
|
||||
* TODO: It's a bit ugly still*/
|
||||
LooqsQuery LooqsQuery::build(QString expression, TokenType loneWordsTokenType, bool mergeLoneWords)
|
||||
{
|
||||
if(expression.isEmpty())
|
||||
{
|
||||
return LooqsQuery{};
|
||||
}
|
||||
if(!checkParanthesis(expression))
|
||||
{
|
||||
throw LooqsGeneralException("Invalid paranthesis");
|
||||
|
Loading…
Reference in New Issue
Block a user