mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 22:03:27 -07:00
Fixup previous commits on python search.
This commit is contained in:
parent
568950e63e
commit
636ff89e23
2 changed files with 4 additions and 4 deletions
|
@ -271,7 +271,7 @@ int misc::pythonVersion()
|
||||||
static int version = -1;
|
static int version = -1;
|
||||||
if (version < 0) {
|
if (version < 0) {
|
||||||
QProcess python_proc;
|
QProcess python_proc;
|
||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
#if defined(Q_OS_UNIX)
|
||||||
/*
|
/*
|
||||||
* On Unix-Like Systems python2 and python3 should always exist
|
* On Unix-Like Systems python2 and python3 should always exist
|
||||||
* http://legacy.python.org/dev/peps/pep-0394/
|
* http://legacy.python.org/dev/peps/pep-0394/
|
||||||
|
@ -310,7 +310,7 @@ int misc::pythonVersion()
|
||||||
|
|
||||||
QString misc::pythonExecutable()
|
QString misc::pythonExecutable()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
#if defined(Q_OS_UNIX)
|
||||||
/*
|
/*
|
||||||
* On Unix-Like Systems python2 and python3 should always exist
|
* On Unix-Like Systems python2 and python3 should always exist
|
||||||
* http://legacy.python.org/dev/peps/pep-0394/
|
* http://legacy.python.org/dev/peps/pep-0394/
|
||||||
|
|
|
@ -1762,8 +1762,8 @@ QString Preferences::getPythonPath()
|
||||||
// Fallback: Detect python from default locations
|
// Fallback: Detect python from default locations
|
||||||
const QStringList dirs = QDir("C:/").entryList(QStringList("Python*"), QDir::Dirs, QDir::Name | QDir::Reversed);
|
const QStringList dirs = QDir("C:/").entryList(QStringList("Python*"), QDir::Dirs, QDir::Name | QDir::Reversed);
|
||||||
foreach (const QString &dir, dirs) {
|
foreach (const QString &dir, dirs) {
|
||||||
const QString path("C:/" + dir + "/python.exe");
|
const QString path("C:/" + dir + "/");
|
||||||
if (QFile::exists(path))
|
if (QFile::exists(path + "python.exe"))
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue