forked from qt-creator/qt-creator
Forgot these two files in previous commit
Should have been part of 83e3524b53
This commit is contained in:
90
src/plugins/cmakeprojectmanager/cmakestep.cpp
Normal file
90
src/plugins/cmakeprojectmanager/cmakestep.cpp
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
#include "cmakestep.h"
|
||||||
|
#include "cmakeprojectconstants.h"
|
||||||
|
#include "cmakeproject.h"
|
||||||
|
|
||||||
|
using namespace CMakeProjectManager;
|
||||||
|
using namespace CMakeProjectManager::Internal;
|
||||||
|
|
||||||
|
CMakeStep::CMakeStep(CMakeProject *pro)
|
||||||
|
: BuildStep(pro), m_pro(pro)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CMakeStep::~CMakeStep()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CMakeStep::init(const QString &buildConfiguration)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMakeStep::run(QFutureInterface<bool> &fi)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
fi.reportResult(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CMakeStep::name()
|
||||||
|
{
|
||||||
|
return "CMake";
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CMakeStep::displayName()
|
||||||
|
{
|
||||||
|
return Constants::CMAKESTEP;
|
||||||
|
}
|
||||||
|
|
||||||
|
ProjectExplorer::BuildStepConfigWidget *CMakeStep::createConfigWidget()
|
||||||
|
{
|
||||||
|
return new CMakeBuildStepConfigWidget();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CMakeStep::immutable() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// CMakeBuildStepConfigWidget
|
||||||
|
//
|
||||||
|
|
||||||
|
QString CMakeBuildStepConfigWidget::displayName() const
|
||||||
|
{
|
||||||
|
return "CMake";
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMakeBuildStepConfigWidget::init(const QString &buildConfiguration)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// CMakeBuildStepFactory
|
||||||
|
//
|
||||||
|
|
||||||
|
bool CMakeBuildStepFactory::canCreate(const QString &name) const
|
||||||
|
{
|
||||||
|
return (Constants::CMAKESTEP == name);
|
||||||
|
}
|
||||||
|
|
||||||
|
ProjectExplorer::BuildStep *CMakeBuildStepFactory::create(ProjectExplorer::Project *project, const QString &name) const
|
||||||
|
{
|
||||||
|
Q_ASSERT(name == Constants::CMAKESTEP);
|
||||||
|
CMakeProject *pro = qobject_cast<CMakeProject *>(project);
|
||||||
|
Q_ASSERT(pro);
|
||||||
|
return new CMakeStep(pro);
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList CMakeBuildStepFactory::canCreateForProject(ProjectExplorer::Project *pro) const
|
||||||
|
{
|
||||||
|
return QStringList();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CMakeBuildStepFactory::displayNameForName(const QString &name) const
|
||||||
|
{
|
||||||
|
return "CMake";
|
||||||
|
}
|
||||||
|
|
||||||
48
src/plugins/cmakeprojectmanager/cmakestep.h
Normal file
48
src/plugins/cmakeprojectmanager/cmakestep.h
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
#ifndef CMAKESTEP_H
|
||||||
|
#define CMAKESTEP_H
|
||||||
|
|
||||||
|
#include <projectexplorer/buildstep.h>
|
||||||
|
|
||||||
|
namespace CMakeProjectManager {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
|
class CMakeProject;
|
||||||
|
|
||||||
|
class CMakeBuildStepConfigWidget;
|
||||||
|
|
||||||
|
class CMakeStep : public ProjectExplorer::BuildStep
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CMakeStep(CMakeProject *pro);
|
||||||
|
~CMakeStep();
|
||||||
|
virtual bool init(const QString &buildConfiguration);
|
||||||
|
|
||||||
|
virtual void run(QFutureInterface<bool> &fi);
|
||||||
|
|
||||||
|
virtual QString name();
|
||||||
|
virtual QString displayName();
|
||||||
|
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
|
||||||
|
virtual bool immutable() const;
|
||||||
|
private:
|
||||||
|
CMakeProject *m_pro;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CMakeBuildStepConfigWidget :public ProjectExplorer::BuildStepConfigWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual QString displayName() const;
|
||||||
|
virtual void init(const QString &buildConfiguration);
|
||||||
|
};
|
||||||
|
|
||||||
|
class CMakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory
|
||||||
|
{
|
||||||
|
virtual bool canCreate(const QString &name) const;
|
||||||
|
virtual ProjectExplorer::BuildStep *create(ProjectExplorer::Project *pro, const QString &name) const;
|
||||||
|
virtual QStringList canCreateForProject(ProjectExplorer::Project *pro) const;
|
||||||
|
virtual QString displayNameForName(const QString &name) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // CMAKESTEP_H
|
||||||
Reference in New Issue
Block a user