QMessageBox::warning(0,tr("Uninstall warning"),tr("Some plugins could not be uninstalled because they are included in qBittorrent.\n Only the ones you added yourself can be uninstalled.\nHowever, those plugins were disabled."));
QMessageBox::warning(0,tr("Uninstall warning"),tr("Some plugins could not be uninstalled because they are included in qBittorrent. Only the ones you added yourself can be uninstalled.\nThose plugins were disabled."));
else
else
QMessageBox::information(0,tr("Uninstall success"),tr("All selected plugins were uninstalled successfully"));
QMessageBox::information(0,tr("Uninstall success"),tr("All selected plugins were uninstalled successfully"));
qDebug("Version to be installed: %.2f",new_version);
qDebug("Version to be installed: %.2f",new_version);
if(!isUpdateNeeded(plugin_name,new_version)){
if(!isUpdateNeeded(plugin_name,new_version)){
qDebug("Apparently update is not needed, we have a more recent version");
qDebug("Apparently update is not needed, we have a more recent version");
QMessageBox::information(this,tr("Search plugin install")+" -- qBittorrent",tr("A more recent version of %1 search engine plugin is already installed.","%1 is the name of the search engine").arg(plugin_name));
QMessageBox::information(this,tr("Search plugin install"),tr("A more recent version of %1 search engine plugin is already 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 updated, keeping old version.","%1 is the name of the search engine").arg(plugin_name));
QMessageBox::warning(this,tr("Search plugin install"),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
Utils::Fs::forceRemove(dest_path);
Utils::Fs::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("%1 search engine plugin could not be installed.","%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));
QMessageBox::information(this,tr("Search plugin install"),tr("%1 search engine plugin was successfully updated.","%1 is the name of the search engine").arg(plugin_name));
return;
return;
}else{
}else{
QMessageBox::information(this,tr("Search plugin install")+" -- "+tr("qBittorrent"),tr("%1 search engine plugin was successfully installed.","%1 is the name of the search engine").arg(plugin_name));
QMessageBox::information(this,tr("Search plugin install"),tr("%1 search engine plugin was successfully installed.","%1 is the name of the search engine").arg(plugin_name));
QMessageBox::warning(this,tr("Search plugin update")+" -- "+tr("qBittorrent"),tr("Sorry, %1 search plugin install failed.","%1 is the name of the search engine").arg(plugin_name));
QMessageBox::warning(this,tr("Search plugin update"),tr("Sorry, %1 search plugin installation failed.","%1 is the name of the search engine").arg(plugin_name));