aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r--src/plugins/python/pythonutils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp
index 3cec49a2cd5..1bc72aed0f4 100644
--- a/src/plugins/python/pythonutils.cpp
+++ b/src/plugins/python/pythonutils.cpp
@@ -44,7 +44,8 @@ FilePath detectPython(const FilePath &documentPath)
FilePaths dirs = Environment::systemEnvironment().path();
- if (project && project->mimeType() == Constants::C_PY_PROJECT_MIME_TYPE) {
+ if (project && (project->mimeType() == Constants::C_PY_PROJECT_MIME_TYPE
+ || project->mimeType() == Constants::C_PY_PROJECT_MIME_TYPE_TOML)) {
if (auto bc = qobject_cast<PythonBuildConfiguration *>(project->activeBuildConfiguration()))
return bc->python();
if (const std::optional<Interpreter> python = PythonKitAspect::python(project->activeKit()))
@@ -248,4 +249,4 @@ QString pythonVersion(const FilePath &python)
return QString();
}
-} // Python::Internal
+} // namespace Python::Internal