forked from qt-creator/qt-creator
Python: add PySide installation check on document open
Checks if the document imports PySide and whether the selected python interpreter can find a PySide installation. If not show a global info bar that can install PySide via pip like the python lsp server. Task-number: PYSIDE-1742 Change-Id: I02c0d5f6eb268f3d8826d4fb9d9ec3c7c48b8638 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -549,6 +549,12 @@ Interpreter PythonSettings::defaultInterpreter()
|
||||
return interpreterOptionsPage().defaultInterpreter();
|
||||
}
|
||||
|
||||
Interpreter PythonSettings::interpreter(const QString &interpreterId)
|
||||
{
|
||||
const QList<Interpreter> interpreters = PythonSettings::interpreters();
|
||||
return Utils::findOrDefault(interpreters, Utils::equal(&Interpreter::id, interpreterId));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Python
|
||||
|
||||
|
||||
Reference in New Issue
Block a user