forked from qt-creator/qt-creator
Python: check for pyside tools after installation
Change-Id: Icf9ae0ec08a78efc51216daa3304e76f8e812d5f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -202,6 +202,12 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Id id)
|
||||
setRunnableModifier([](Runnable &r) {
|
||||
r.workingDirectory = r.workingDirectory.onDevice(r.command.executable());
|
||||
});
|
||||
|
||||
connect(PySideInstaller::instance(), &PySideInstaller::pySideInstalled, this,
|
||||
[this](const FilePath &python) {
|
||||
if (python == aspect<InterpreterAspect>()->currentInterpreter().command)
|
||||
checkForPySide(python);
|
||||
});
|
||||
}
|
||||
|
||||
PythonRunConfiguration::~PythonRunConfiguration()
|
||||
@@ -209,9 +215,8 @@ PythonRunConfiguration::~PythonRunConfiguration()
|
||||
qDeleteAll(m_extraCompilers);
|
||||
}
|
||||
|
||||
void PythonRunConfiguration::currentInterpreterChanged()
|
||||
void PythonRunConfiguration::checkForPySide(const FilePath &python)
|
||||
{
|
||||
const FilePath python = aspect<InterpreterAspect>()->currentInterpreter().command;
|
||||
BuildStepList *buildSteps = target()->activeBuildConfiguration()->buildSteps();
|
||||
|
||||
Utils::FilePath pySideProjectPath;
|
||||
@@ -255,6 +260,12 @@ void PythonRunConfiguration::currentInterpreterChanged()
|
||||
|
||||
if (auto pySideBuildStep = buildSteps->firstOfType<PySideBuildStep>())
|
||||
pySideBuildStep->updatePySideProjectPath(pySideProjectPath);
|
||||
}
|
||||
|
||||
void PythonRunConfiguration::currentInterpreterChanged()
|
||||
{
|
||||
const FilePath python = aspect<InterpreterAspect>()->currentInterpreter().command;
|
||||
checkForPySide(python);
|
||||
|
||||
for (FilePath &file : project()->files(Project::AllFiles)) {
|
||||
if (auto document = TextEditor::TextDocument::textDocumentForFilePath(file)) {
|
||||
|
||||
Reference in New Issue
Block a user