mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 14:04:23 +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
|
#endif
|
||||||
if(searchProcess->state() != QProcess::NotRunning){
|
if(searchProcess->state() != QProcess::NotRunning){
|
||||||
|
#ifdef Q_WS_WIN
|
||||||
|
searchProcess->kill();
|
||||||
|
#else
|
||||||
searchProcess->terminate();
|
searchProcess->terminate();
|
||||||
|
#endif
|
||||||
search_stopped = true;
|
search_stopped = true;
|
||||||
if(searchTimeout->isActive()) {
|
if(searchTimeout->isActive()) {
|
||||||
searchTimeout->stop();
|
searchTimeout->stop();
|
||||||
@ -546,7 +550,11 @@ void SearchEngine::searchFinished(int exitcode,QProcess::ExitStatus){
|
|||||||
parent->showNotificationBaloon(tr("Search Engine"), tr("Search has finished"));
|
parent->showNotificationBaloon(tr("Search Engine"), tr("Search has finished"));
|
||||||
}
|
}
|
||||||
if(exitcode){
|
if(exitcode){
|
||||||
|
#ifdef Q_WS_WIN
|
||||||
|
search_status->setText(tr("Search aborted"));
|
||||||
|
#else
|
||||||
search_status->setText(tr("An error occured during search..."));
|
search_status->setText(tr("An error occured during search..."));
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
if(search_stopped){
|
if(search_stopped){
|
||||||
search_status->setText(tr("Search aborted"));
|
search_status->setText(tr("Search aborted"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user