Browse Source

Fixup previous commits on python search.

adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
8b99e29dc0
  1. 4
      src/core/preferences.cpp
  2. 4
      src/core/utils/misc.cpp

4
src/core/preferences.cpp

@ -1765,8 +1765,8 @@ QString Preferences::getPythonPath() @@ -1765,8 +1765,8 @@ QString Preferences::getPythonPath()
// Fallback: Detect python from default locations
const QStringList dirs = QDir("C:/").entryList(QStringList("Python*"), QDir::Dirs, QDir::Name | QDir::Reversed);
foreach (const QString &dir, dirs) {
const QString path("C:/" + dir + "/python.exe");
if (QFile::exists(path))
const QString path("C:/" + dir + "/");
if (QFile::exists(path + "python.exe"))
return path;
}

4
src/core/utils/misc.cpp

@ -233,7 +233,7 @@ int Utils::Misc::pythonVersion() @@ -233,7 +233,7 @@ int Utils::Misc::pythonVersion()
static int version = -1;
if (version < 0) {
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
* http://legacy.python.org/dev/peps/pep-0394/
@ -272,7 +272,7 @@ int Utils::Misc::pythonVersion() @@ -272,7 +272,7 @@ int Utils::Misc::pythonVersion()
QString Utils::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
* http://legacy.python.org/dev/peps/pep-0394/

Loading…
Cancel
Save