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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 77 additions and 16 deletions

View file

@ -1487,6 +1487,19 @@ void Preferences::setTrackerPortForwardingEnabled(const bool enabled)
setValue(u"Preferences/Advanced/trackerPortForwarding"_s, enabled);
}
Path Preferences::getPythonExecutablePath() const
{
return value(u"Preferences/Search/pythonExecutablePath"_s, Path());
}
void Preferences::setPythonExecutablePath(const Path &path)
{
if (path == getPythonExecutablePath())
return;
setValue(u"Preferences/Search/pythonExecutablePath"_s, path);
}
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
bool Preferences::isUpdateCheckEnabled() const
{