QMessageBox::warning(this,tr("Search plugin install")+" -- "+tr("qBittorrent"),tr("%1 search engine plugin could not be updated, keeping old version.","%1 is the name of the search engine").arg(plugin_name));
QMessageBox::warning(this,tr("Search plugin install")+" -- "+tr("qBittorrent"),tr("%1 search engine plugin could not be updated, keeping old version.","%1 is the name of the search engine").arg(plugin_name));
return;
return;
}else{
}else{
// Remove broken file
// Remove broken file
QFile::remove(dest_path);
fsutils::forceRemove(dest_path);
QMessageBox::warning(this,tr("Search plugin install")+" -- "+tr("qBittorrent"),tr("%1 search engine plugin could not be installed.","%1 is the name of the search engine").arg(plugin_name));
QMessageBox::warning(this,tr("Search plugin install")+" -- "+tr("qBittorrent"),tr("%1 search engine plugin could not be installed.","%1 is the name of the search engine").arg(plugin_name));
return;
return;
}
}
}
}
// Install was successful, remove backup
// Install was successful, remove backup
if(update){
if(update){
QFile::remove(dest_path+".bak");
fsutils::forceRemove(dest_path+".bak");
}
}
if(update){
if(update){
QMessageBox::information(this,tr("Search plugin install")+" -- "+tr("qBittorrent"),tr("%1 search engine plugin was successfully updated.","%1 is the name of the search engine").arg(plugin_name));
QMessageBox::information(this,tr("Search plugin install")+" -- "+tr("qBittorrent"),tr("%1 search engine plugin was successfully updated.","%1 is the name of the search engine").arg(plugin_name));