From 2c48968a316df1f06763fdead8eb56693ab928e7 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 22 Jul 2007 13:42:09 +0000 Subject: [PATCH] - a search request can now be terminated by another --- Changelog | 1 + TODO | 1 - src/searchEngine.cpp | 6 ++++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 1ecb3bb3a..cb09df65b 100644 --- a/Changelog +++ b/Changelog @@ -25,6 +25,7 @@ - FEATURE: Added keyboard shortcuts for main actions (see wiki) - FEATURE: Added a popup menu to set priority for multiple fies at once - FEATURE: Improved a lot downloading from urls (using libcommoncpp2 instead of libcurl) + - FEATURE: A search request can now be terminated by another - I18N: Added Hungarian translation - BUGFIX: Progress of paused torrents is now correct on restart - BUGFIX: Progress column gets sorted on restart it is was during last execution diff --git a/TODO b/TODO index 1aa9b2798..48c98c7b4 100644 --- a/TODO +++ b/TODO @@ -44,7 +44,6 @@ * beta3 - Windows port (Chris - Peerkoel) - Translations update - - Allow to abort a search by launching another one * beta2 - Wait for some bug fixes in libtorrent : - upload/download limit per torrent diff --git a/src/searchEngine.cpp b/src/searchEngine.cpp index 488c60533..e35c0ff07 100644 --- a/src/searchEngine.cpp +++ b/src/searchEngine.cpp @@ -260,6 +260,10 @@ void SearchEngine::saveSearchHistory() // Function called when we click on search button void SearchEngine::on_search_button_clicked(){ + if(searchProcess->state() != QProcess::NotRunning){ + searchProcess->kill(); + searchProcess->waitForFinished(); + } QString pattern = search_pattern->text().trimmed(); // No search pattern entered if(pattern.isEmpty()){ @@ -319,8 +323,6 @@ void SearchEngine::on_search_button_clicked(){ void SearchEngine::searchStarted(){ // Update SearchEngine widgets - search_button->setEnabled(false); - search_button->repaint(); search_status->setText(tr("Searching...")); search_status->repaint(); stop_search_button->setEnabled(true);