forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user