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";
|
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()
|
PySideBuildStepFactory::PySideBuildStepFactory()
|
||||||
{
|
{
|
||||||
registerStep<PySideBuildStep>(pySideBuildStep);
|
registerStep<PySideBuildStep>(pySideBuildStep);
|
||||||
@@ -83,7 +69,13 @@ void PySideBuildStep::doRun()
|
|||||||
emit finished(true);
|
emit finished(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
PySideBuildConfiguration::PySideBuildConfiguration(Target *target, Id id)
|
|
||||||
|
// PySideBuildConfiguration
|
||||||
|
|
||||||
|
class PySideBuildConfiguration : public BuildConfiguration
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PySideBuildConfiguration(Target *target, Id id)
|
||||||
: BuildConfiguration(target, id)
|
: BuildConfiguration(target, id)
|
||||||
{
|
{
|
||||||
setConfigWidgetDisplayName(Tr::tr("General"));
|
setConfigWidgetDisplayName(Tr::tr("General"));
|
||||||
@@ -95,5 +87,20 @@ PySideBuildConfiguration::PySideBuildConfiguration(Target *target, Id id)
|
|||||||
|
|
||||||
updateCacheAndEmitEnvironmentChanged();
|
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
|
} // Python::Internal
|
||||||
|
|||||||
@@ -9,18 +9,6 @@
|
|||||||
|
|
||||||
namespace Python::Internal {
|
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
|
class PySideBuildStep : public ProjectExplorer::AbstractProcessStep
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -41,4 +29,10 @@ public:
|
|||||||
PySideBuildStepFactory();
|
PySideBuildStepFactory();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PySideBuildConfigurationFactory : public ProjectExplorer::BuildConfigurationFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PySideBuildConfigurationFactory();
|
||||||
|
};
|
||||||
|
|
||||||
} // Python::Internal
|
} // Python::Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user