forked from qt-creator/qt-creator
CMake: Move CMakeInstallStep definition to .cpp
It doesn't have to be a Q_OBJECT. Smaller interface. Also de-noise a bit. Change-Id: I70c056e76646e9de166ded46f6fd4f448a804112 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "cmakeinstallstep.h"
|
#include "cmakeinstallstep.h"
|
||||||
|
|
||||||
|
#include "cmakeabstractprocessstep.h"
|
||||||
#include "cmakebuildsystem.h"
|
#include "cmakebuildsystem.h"
|
||||||
#include "cmakekitinformation.h"
|
#include "cmakekitinformation.h"
|
||||||
#include "cmakeparser.h"
|
#include "cmakeparser.h"
|
||||||
@@ -27,7 +28,23 @@ const char CMAKE_ARGUMENTS_KEY[] = "CMakeProjectManager.InstallStep.CMakeArgumen
|
|||||||
|
|
||||||
// CMakeInstallStep
|
// CMakeInstallStep
|
||||||
|
|
||||||
CMakeInstallStep::CMakeInstallStep(BuildStepList *bsl, Utils::Id id)
|
class CMakeInstallStep : public CMakeAbstractProcessStep
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CMakeInstallStep(ProjectExplorer::BuildStepList *bsl, Id id);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CommandLine cmakeCommand() const;
|
||||||
|
|
||||||
|
void processFinished(bool success) override;
|
||||||
|
|
||||||
|
void setupOutputFormatter(OutputFormatter *formatter) override;
|
||||||
|
QWidget *createConfigWidget() override;
|
||||||
|
|
||||||
|
StringAspect *m_cmakeArguments = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
CMakeInstallStep::CMakeInstallStep(BuildStepList *bsl, Id id)
|
||||||
: CMakeAbstractProcessStep(bsl, id)
|
: CMakeAbstractProcessStep(bsl, id)
|
||||||
{
|
{
|
||||||
m_cmakeArguments = addAspect<StringAspect>();
|
m_cmakeArguments = addAspect<StringAspect>();
|
||||||
@@ -38,7 +55,7 @@ CMakeInstallStep::CMakeInstallStep(BuildStepList *bsl, Utils::Id id)
|
|||||||
setCommandLineProvider([this] { return cmakeCommand(); });
|
setCommandLineProvider([this] { return cmakeCommand(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeInstallStep::setupOutputFormatter(Utils::OutputFormatter *formatter)
|
void CMakeInstallStep::setupOutputFormatter(OutputFormatter *formatter)
|
||||||
{
|
{
|
||||||
CMakeParser *cmakeParser = new CMakeParser;
|
CMakeParser *cmakeParser = new CMakeParser;
|
||||||
cmakeParser->setSourceDirectory(project()->projectDirectory());
|
cmakeParser->setSourceDirectory(project()->projectDirectory());
|
||||||
@@ -119,5 +136,5 @@ CMakeInstallStepFactory::CMakeInstallStepFactory()
|
|||||||
setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_DEPLOY});
|
setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_DEPLOY});
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace CMakeProjectManager::Internal
|
} // CMakeProjectManager::Internal
|
||||||
|
|
||||||
|
@@ -3,38 +3,14 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cmakeabstractprocessstep.h"
|
#include <projectexplorer/buildstep.h>
|
||||||
|
|
||||||
namespace Utils {
|
|
||||||
class CommandLine;
|
|
||||||
class StringAspect;
|
|
||||||
} // namespace Utils
|
|
||||||
|
|
||||||
namespace CMakeProjectManager::Internal {
|
namespace CMakeProjectManager::Internal {
|
||||||
|
|
||||||
class CMakeInstallStep : public CMakeAbstractProcessStep
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
CMakeInstallStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Utils::CommandLine cmakeCommand() const;
|
|
||||||
|
|
||||||
void processFinished(bool success) override;
|
|
||||||
|
|
||||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
|
||||||
QWidget *createConfigWidget() override;
|
|
||||||
|
|
||||||
friend class CMakeInstallStepConfigWidget;
|
|
||||||
Utils::StringAspect *m_cmakeArguments = nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
class CMakeInstallStepFactory : public ProjectExplorer::BuildStepFactory
|
class CMakeInstallStepFactory : public ProjectExplorer::BuildStepFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMakeInstallStepFactory();
|
CMakeInstallStepFactory();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CMakeProjectManager::Internal
|
} // CMakeProjectManager::Internal
|
||||||
|
Reference in New Issue
Block a user