mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
Search requests can now be cancelled on Win32
This commit is contained in:
parent
a0d685bfe2
commit
a8a2ba188d
@ -287,7 +287,11 @@ void SearchEngine::on_search_button_clicked(){
|
||||
}
|
||||
#endif
|
||||
if(searchProcess->state() != QProcess::NotRunning){
|
||||
#ifdef Q_WS_WIN
|
||||
searchProcess->kill();
|
||||
#else
|
||||
searchProcess->terminate();
|
||||
#endif
|
||||
search_stopped = true;
|
||||
if(searchTimeout->isActive()) {
|
||||
searchTimeout->stop();
|
||||
@ -546,7 +550,11 @@ void SearchEngine::searchFinished(int exitcode,QProcess::ExitStatus){
|
||||
parent->showNotificationBaloon(tr("Search Engine"), tr("Search has finished"));
|
||||
}
|
||||
if(exitcode){
|
||||
#ifdef Q_WS_WIN
|
||||
search_status->setText(tr("Search aborted"));
|
||||
#else
|
||||
search_status->setText(tr("An error occured during search..."));
|
||||
#endif
|
||||
}else{
|
||||
if(search_stopped){
|
||||
search_status->setText(tr("Search aborted"));
|
||||
|
Loading…
Reference in New Issue
Block a user