Allow users to specify Python executable path

Closes #19195.
PR #19644.
This commit is contained in:
Chocobo1
2023-09-28 01:27:48 +08:00
committed by GitHub
parent 529e49aea7
commit b3fda76027
10 changed files with 77 additions and 16 deletions

View File

@@ -1635,11 +1635,11 @@ void MainWindow::on_actionRSSReader_triggered()
void MainWindow::on_actionSearchWidget_triggered()
{
if (!m_hasPython && m_ui->actionSearchWidget->isChecked())
if (m_ui->actionSearchWidget->isChecked())
{
const Utils::ForeignApps::PythonInfo pyInfo = Utils::ForeignApps::pythonInfo();
// Not installed
// Not found
if (!pyInfo.isValid())
{
m_ui->actionSearchWidget->setChecked(false);
@@ -1679,7 +1679,6 @@ void MainWindow::on_actionSearchWidget_triggered()
return;
}
m_hasPython = true;
m_ui->actionSearchWidget->setChecked(true);
Preferences::instance()->setSearchEnabled(true);
}