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:
hjk
2023-07-05 09:30:51 +02:00
parent 7a28ed76b8
commit b3df9a4fcf
3 changed files with 59 additions and 37 deletions

View File

@@ -4,21 +4,27 @@
#pragma once
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/runcontrol.h>
namespace Python::Internal {
class PySideUicExtraCompiler;
class PythonRunConfiguration;
class PythonRunConfiguration : public ProjectExplorer::RunConfiguration
class PythonInterpreterAspect final : public ProjectExplorer::InterpreterAspect
{
Q_OBJECT
public:
PythonRunConfiguration(ProjectExplorer::Target *target, Utils::Id id);
~PythonRunConfiguration() override;
explicit PythonInterpreterAspect(PythonRunConfiguration *rc);
~PythonInterpreterAspect() final;
QList<PySideUicExtraCompiler *> extraCompilers() const;
private:
friend class PythonRunConfiguration;
class PythonInterpreterAspectPrivate *d = nullptr;
};
class PythonRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory