qDebug("Version to be installed: %.2f",new_version);
if(!isUpdateNeeded(plugin_name,new_version)){
qDebug("Apparently update is not needed, we have a more recent version");
QMessageBox::information(this,tr("Search plugin install")+" -- "+tr("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.toLocal8Bit().data()));
QMessageBox::information(this,tr("Search plugin install")+" -- "+tr("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::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.toLocal8Bit().data()));
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;
}else{
// Remove broken file
QFile::remove(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.toLocal8Bit().data()));
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::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.toLocal8Bit().data()));
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));
return;
}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.toLocal8Bit().data()));
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::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.toLocal8Bit().data()));
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));
std::cout<<tr("To control qBittorrent, access the Web UI at http://localhost:%1").arg(QString::number(Preferences::getWebUiPort())).toLocal8Bit().data()<<std::endl;
std::cout<<tr("The Web UI administrator user name is: %1").arg(Preferences::getWebUiUsername()).toLocal8Bit().data()<<std::endl;
std::cout<<qPrintable(tr("To control qBittorrent, access the Web UI at http://localhost:%1").arg(QString::number(Preferences::getWebUiPort())))<<std::endl;
std::cout<<qPrintable(tr("The Web UI administrator user name is: %1").arg(Preferences::getWebUiUsername()))<<std::endl;