aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonlanguageclient.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-07-05 09:30:51 +0200
committerhjk <hjk@qt.io>2023-07-07 05:20:48 +0000
commitb3df9a4fcf4cb13ef9125a7286ea1d96b445cf00 (patch)
tree2028cc47abdcadfb135b0db7fa061c0b81140fe2 /src/plugins/python/pythonlanguageclient.cpp
parent7a28ed76b83f66e0b08290ac10bd40ebe92d1972 (diff)
Python: Centralize interpreter specific function in the aspect
... and expose that instead of the PythonRunConfiguration. This makes the PythonRunConfiguration more the container of aspects, similar to where the other runconfigs move. Change-Id: Ibc76b706f2d4d334640ea8f3b91343f9e7c0f566 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/python/pythonlanguageclient.cpp')
-rw-r--r--src/plugins/python/pythonlanguageclient.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp
index eecfb35c97f..1006eea3e82 100644
--- a/src/plugins/python/pythonlanguageclient.cpp
+++ b/src/plugins/python/pythonlanguageclient.cpp
@@ -207,8 +207,9 @@ void PyLSClient::openDocument(TextEditor::TextDocument *document)
const FilePath documentPath = document->filePath();
if (PythonProject *project = pythonProjectForFile(documentPath)) {
if (Target *target = project->activeTarget()) {
- if (auto rc = qobject_cast<PythonRunConfiguration *>(target->activeRunConfiguration()))
- updateExtraCompilers(project, rc->extraCompilers());
+ if (RunConfiguration *rc = target->activeRunConfiguration())
+ if (auto aspect = rc->aspect<PythonInterpreterAspect>())
+ updateExtraCompilers(project, aspect->extraCompilers());
}
} else if (isSupportedDocument(document)) {
const FilePath workspacePath = documentPath.parentDir();