diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 415d3b8..816f67f 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -153,6 +153,8 @@ void MainWindow::lineEditReturnPressed() } //TODO: validate q; ui->lblSearchResults->setText("Searching..."); + searchWatcher.cancel(); + searchWatcher.waitForFinished(); QFuture> searchFuture = QtConcurrent::run([&, q]() { SqliteSearch searcher(db); return searcher.search(q);