diff --git a/shared/looqsquery.cpp b/shared/looqsquery.cpp index 6dd3379..fdcded7 100644 --- a/shared/looqsquery.cpp +++ b/shared/looqsquery.cpp @@ -277,7 +277,7 @@ LooqsQuery LooqsQuery::build(QString expression) throw LooqsGeneralException("Two sort statements are illegal"); } // TODO: hack, since we are not a "filter", we must remove a preceeding (implicit) boolean - if(result.tokens.last().type & BOOL == BOOL) + if((result.tokens.last().type & BOOL) == BOOL) { result.tokens.pop_back(); } @@ -292,7 +292,7 @@ LooqsQuery LooqsQuery::build(QString expression) } } - bool contentsearch = result.getTokensMask() & FILTER_CONTENT == FILTER_CONTENT; + bool contentsearch = (result.getTokensMask() & FILTER_CONTENT) == FILTER_CONTENT; bool sortsForContent = std::any_of(result.sortConditions.begin(), result.sortConditions.end(), [](SortCondition c) { return c.field == CONTENT_TEXT; }); diff --git a/shared/sqlitesearch.cpp b/shared/sqlitesearch.cpp index 032441d..e1bb4f5 100644 --- a/shared/sqlitesearch.cpp +++ b/shared/sqlitesearch.cpp @@ -127,7 +127,7 @@ QSqlQuery SqliteSearch::makeSqlQuery(const LooqsQuery &query) QString whereSql; QString joinSql; QVector bindValues; - bool isContentSearch = query.getTokensMask() & FILTER_CONTENT == FILTER_CONTENT; + bool isContentSearch = (query.getTokensMask() & FILTER_CONTENT) == FILTER_CONTENT; if(query.getTokens().isEmpty()) { throw LooqsGeneralException("Nothing to search for supplied");