From 4b9ccc50dacd12183f8954e3bce89abf231fbd08 Mon Sep 17 00:00:00 2001 From: Albert S Date: Wed, 17 Jan 2018 22:44:20 +0100 Subject: [PATCH] window.cpp: connect searchCancelled signal to proper slot --- BUGS | 4 +--- window.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/BUGS b/BUGS index 86a609f..179630f 100644 --- a/BUGS +++ b/BUGS @@ -1,4 +1,2 @@ -Type to fast and search must be triggered again (queues don't work as intended). Here, -we may need proper mutexes. - +SearchWorker: isPending etc. may need proper locking (with mutexes) Memory leaks(ignored for now due to short-running nature of the application) diff --git a/window.cpp b/window.cpp index b4a153f..ba2c798 100644 --- a/window.cpp +++ b/window.cpp @@ -14,7 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "window.h" -#include #include #include #include @@ -34,6 +33,7 @@ Window::Window(const QVector &configs, const QString &dbpath) connect(this, &Window::beginFileSearch, searchWorker, &SearchWorker::searchForFile); connect(this, &Window::beginContentSearch, searchWorker, &SearchWorker::searchForContent); connect(searchWorker, &SearchWorker::searchResultsReady, this, &Window::handleSearchResults); + connect(searchWorker, &SearchWorker::searchCancelled, this, &Window::handleCancelledSearch); searchThread.start(); initTreeWidgets(); this->lineEdit->installEventFilter(this);