mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-28 15:34:16 +00:00
Update Python version requirements
This commit is contained in:
parent
8e64ffba01
commit
88626b26d2
@ -1494,13 +1494,16 @@ void MainWindow::on_actionSearchWidget_triggered()
|
||||
bool res = false;
|
||||
|
||||
if ((pythonVersion == 2) || (pythonVersion == 3)) {
|
||||
// Check python minimum requirement: 2.7.0/3.3.0
|
||||
// Check Python minimum requirement: 2.7.9 / 3.3.0
|
||||
QString version = Utils::Misc::pythonVersionComplete();
|
||||
QStringList splitted = version.split('.');
|
||||
if (splitted.size() > 1) {
|
||||
if (splitted.size() > 2) {
|
||||
int middleVer = splitted.at(1).toInt();
|
||||
if (((pythonVersion == 2) && (middleVer < 7)) || ((pythonVersion == 3) && (middleVer < 3))) {
|
||||
QMessageBox::information(this, tr("Old Python Interpreter"), tr("Your Python version %1 is outdated. Please upgrade to latest version for search engines to work. Minimum requirement: 2.7.0/3.3.0.").arg(version));
|
||||
int lowerVer = splitted.at(2).toInt();
|
||||
if (((pythonVersion == 2) && (middleVer < 7))
|
||||
|| ((pythonVersion == 2) && (middleVer == 7) && (lowerVer < 9))
|
||||
|| ((pythonVersion == 3) && (middleVer < 3))) {
|
||||
QMessageBox::information(this, tr("Old Python Interpreter"), tr("Your Python version (%1) is outdated. Please upgrade to latest version for search engines to work.\nMinimum requirement: 2.7.9 / 3.3.0.").arg(version));
|
||||
m_ui->actionSearchWidget->setChecked(false);
|
||||
Preferences::instance()->setSearchEnabled(false);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user