From 52b296ff01b78aa79fb426f40e61270adabc30d4 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 5 Jun 2022 14:04:42 +0200 Subject: [PATCH] gui: mainwindow: Set default query limit to 1000 --- gui/mainwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index b70fafa..f61e45a 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -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;