CMake: Use setup functions for more plugin items

Change-Id: I48ff764248f29ef2a8f46757cba84705983c7740
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2024-01-29 14:59:59 +01:00
parent a615b236e5
commit d016ef67b3
7 changed files with 76 additions and 89 deletions

View File

@@ -11,6 +11,7 @@
#include "cmakeprojectmanagertr.h"
#include "cmaketool.h"
#include <projectexplorer/buildstep.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/processparameters.h>
#include <projectexplorer/project.h>
@@ -27,7 +28,7 @@ namespace CMakeProjectManager::Internal {
// CMakeInstallStep
class CMakeInstallStep : public CMakeAbstractProcessStep
class CMakeInstallStep final : public CMakeAbstractProcessStep
{
public:
CMakeInstallStep(BuildStepList *bsl, Id id)
@@ -112,14 +113,22 @@ QWidget *CMakeInstallStep::createConfigWidget()
// CMakeInstallStepFactory
CMakeInstallStepFactory::CMakeInstallStepFactory()
class CMakeInstallStepFactory : public ProjectExplorer::BuildStepFactory
{
registerStep<CMakeInstallStep>(Constants::CMAKE_INSTALL_STEP_ID);
setDisplayName(
Tr::tr("CMake Install", "Display name for CMakeProjectManager::CMakeInstallStep id."));
setSupportedProjectType(Constants::CMAKE_PROJECT_ID);
setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_DEPLOY});
public:
CMakeInstallStepFactory()
{
registerStep<CMakeInstallStep>(Constants::CMAKE_INSTALL_STEP_ID);
setDisplayName(
Tr::tr("CMake Install", "Display name for CMakeProjectManager::CMakeInstallStep id."));
setSupportedProjectType(Constants::CMAKE_PROJECT_ID);
setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_DEPLOY});
}
};
void setupCMakeInstallStep()
{
static CMakeInstallStepFactory theCMakeInstallStepFactory;
}
} // CMakeProjectManager::Internal