gui: mainwindow: Set default query limit to 1000

This commit is contained in:
Albert S. 2022-06-05 14:04:42 +02:00
parent e5e43c8bfb
commit 52b296ff01

View File

@ -411,10 +411,20 @@ void MainWindow::lineEditReturnPressed()
if(addPathSearch)
{
LooqsQuery filesQuery = LooqsQuery::build(q, TokenType::FILTER_PATH_CONTAINS, false);
if(filesQuery.getLimit() == -1)
{
filesQuery.setLimit(1000);
}
results.append(searcher.search(filesQuery));
}
if(addContentSearch)
{
if(this->contentSearchQuery.getLimit() == -1)
{
this->contentSearchQuery.setLimit(1000);
}
results.append(searcher.search(this->contentSearchQuery));
}
return results;