forked from qt-creator/qt-creator
Python: Move PySideBuildConfiguration to .cpp
Not publicly needed and closer to the generic pattern. Change-Id: I886f95c24b957b8d3943cd115814bceb6a76b651 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -23,20 +23,6 @@ namespace Python::Internal {
|
||||
|
||||
const char pySideBuildStep[] = "Python.PysideBuildStep";
|
||||
|
||||
PySideBuildConfigurationFactory::PySideBuildConfigurationFactory()
|
||||
{
|
||||
registerBuildConfiguration<PySideBuildConfiguration>("Python.PySideBuildConfiguration");
|
||||
setSupportedProjectType(PythonProjectId);
|
||||
setSupportedProjectMimeTypeName(Constants::C_PY_MIMETYPE);
|
||||
setBuildGenerator([](const Kit *, const FilePath &projectPath, bool) {
|
||||
BuildInfo info;
|
||||
info.displayName = "build";
|
||||
info.typeName = "build";
|
||||
info.buildDirectory = projectPath.parentDir();
|
||||
return QList<BuildInfo>{info};
|
||||
});
|
||||
}
|
||||
|
||||
PySideBuildStepFactory::PySideBuildStepFactory()
|
||||
{
|
||||
registerStep<PySideBuildStep>(pySideBuildStep);
|
||||
@@ -83,9 +69,15 @@ void PySideBuildStep::doRun()
|
||||
emit finished(true);
|
||||
}
|
||||
|
||||
PySideBuildConfiguration::PySideBuildConfiguration(Target *target, Id id)
|
||||
: BuildConfiguration(target, id)
|
||||
|
||||
// PySideBuildConfiguration
|
||||
|
||||
class PySideBuildConfiguration : public BuildConfiguration
|
||||
{
|
||||
public:
|
||||
PySideBuildConfiguration(Target *target, Id id)
|
||||
: BuildConfiguration(target, id)
|
||||
{
|
||||
setConfigWidgetDisplayName(Tr::tr("General"));
|
||||
|
||||
setInitializer([this](const BuildInfo &) {
|
||||
@@ -94,6 +86,21 @@ PySideBuildConfiguration::PySideBuildConfiguration(Target *target, Id id)
|
||||
});
|
||||
|
||||
updateCacheAndEmitEnvironmentChanged();
|
||||
}
|
||||
};
|
||||
|
||||
PySideBuildConfigurationFactory::PySideBuildConfigurationFactory()
|
||||
{
|
||||
registerBuildConfiguration<PySideBuildConfiguration>("Python.PySideBuildConfiguration");
|
||||
setSupportedProjectType(PythonProjectId);
|
||||
setSupportedProjectMimeTypeName(Constants::C_PY_MIMETYPE);
|
||||
setBuildGenerator([](const Kit *, const FilePath &projectPath, bool) {
|
||||
BuildInfo info;
|
||||
info.displayName = "build";
|
||||
info.typeName = "build";
|
||||
info.buildDirectory = projectPath.parentDir();
|
||||
return QList<BuildInfo>{info};
|
||||
});
|
||||
}
|
||||
|
||||
} // Python::Internal
|
||||
|
||||
@@ -9,18 +9,6 @@
|
||||
|
||||
namespace Python::Internal {
|
||||
|
||||
class PySideBuildConfiguration : public ProjectExplorer::BuildConfiguration
|
||||
{
|
||||
public:
|
||||
PySideBuildConfiguration(ProjectExplorer::Target *target, Utils::Id id);
|
||||
};
|
||||
|
||||
class PySideBuildConfigurationFactory : public ProjectExplorer::BuildConfigurationFactory
|
||||
{
|
||||
public:
|
||||
PySideBuildConfigurationFactory();
|
||||
};
|
||||
|
||||
class PySideBuildStep : public ProjectExplorer::AbstractProcessStep
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -41,4 +29,10 @@ public:
|
||||
PySideBuildStepFactory();
|
||||
};
|
||||
|
||||
class PySideBuildConfigurationFactory : public ProjectExplorer::BuildConfigurationFactory
|
||||
{
|
||||
public:
|
||||
PySideBuildConfigurationFactory();
|
||||
};
|
||||
|
||||
} // Python::Internal
|
||||
|
||||
Reference in New Issue
Block a user