From 8b99e29dc0665cb44261d2e194d366326939afc5 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Mon, 20 Jul 2015 23:18:20 +0300 Subject: [PATCH] Fixup previous commits on python search. --- src/core/preferences.cpp | 4 ++-- src/core/utils/misc.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/preferences.cpp b/src/core/preferences.cpp index 6b2af1979..6fa063cef 100644 --- a/src/core/preferences.cpp +++ b/src/core/preferences.cpp @@ -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; } diff --git a/src/core/utils/misc.cpp b/src/core/utils/misc.cpp index 3dc6927c2..5e0e80806 100644 --- a/src/core/utils/misc.cpp +++ b/src/core/utils/misc.cpp @@ -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() 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/