Merge pull request #15467 from xavier2k6/Python_URL

Update python installer URL for Windows
This commit is contained in:
Chocobo1 2021-10-11 12:47:00 +08:00 committed by GitHub
commit 45a1c25a29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1886,15 +1886,15 @@ void MainWindow::on_actionSearchWidget_triggered()
#ifdef Q_OS_WIN
const QMessageBox::StandardButton buttonPressed = QMessageBox::question(this, tr("Old Python Runtime")
, tr("Your Python version (%1) is outdated. Minimum requirement: 3.5.0.\nDo you want to install a newer version now?")
.arg(pyInfo.version)
, tr("Your Python version (%1) is outdated. Minimum requirement: %2.\nDo you want to install a newer version now?")
.arg(pyInfo.version, QLatin1String("3.5.0"))
, (QMessageBox::Yes | QMessageBox::No), QMessageBox::Yes);
if (buttonPressed == QMessageBox::Yes)
installPython();
#else
QMessageBox::information(this, tr("Old Python Runtime")
, tr("Your Python version (%1) is outdated. Please upgrade to latest version for search engines to work.\nMinimum requirement: 3.3.0.")
.arg(pyInfo.version));
, tr("Your Python version (%1) is outdated. Please upgrade to latest version for search engines to work.\nMinimum requirement: %2.")
.arg(pyInfo.version, QLatin1String("3.5.0")));
#endif
return;
}
@ -2158,9 +2158,9 @@ void MainWindow::installPython()
setCursor(QCursor(Qt::WaitCursor));
// Download python
#ifdef QBT_APP_64BIT
const QString installerURL = "https://www.python.org/ftp/python/3.8.5/python-3.8.5-amd64.exe";
const QString installerURL = "https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe";
#else
const QString installerURL = "https://www.python.org/ftp/python/3.8.5/python-3.8.5.exe";
const QString installerURL = "https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe";
#endif
Net::DownloadManager::instance()->download(
Net::DownloadRequest(installerURL).saveToFile(true)