forked from qt-creator/qt-creator
Fixes: Correctly restore BuildSteps and add configuration options to the cmakestep.
Details: Forgot to add the factories, also the configuration options for the cmakestep don't work atm.
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#include "cmakeprojectplugin.h"
|
||||
#include "cmakeprojectmanager.h"
|
||||
#include "cmakerunconfiguration.h"
|
||||
#include "cmakestep.h"
|
||||
#include "makestep.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
@@ -58,6 +60,8 @@ bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString *
|
||||
if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":cmakeproject/CMakeProject.mimetypes.xml"), errorMessage))
|
||||
return false;
|
||||
addAutoReleasedObject(new CMakeManager());
|
||||
addAutoReleasedObject(new CMakeBuildStepFactory());
|
||||
addAutoReleasedObject(new MakeBuildStepFactory());
|
||||
addAutoReleasedObject(new CMakeRunConfigurationFactory());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "cmakeprojectconstants.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <QtGui/QFormLayout>
|
||||
#include <QtGui/QLineEdit>
|
||||
|
||||
using namespace CMakeProjectManager;
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
@@ -83,7 +85,7 @@ QString CMakeStep::displayName()
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *CMakeStep::createConfigWidget()
|
||||
{
|
||||
return new CMakeBuildStepConfigWidget();
|
||||
return new CMakeBuildStepConfigWidget(this);
|
||||
}
|
||||
|
||||
bool CMakeStep::immutable() const
|
||||
@@ -95,6 +97,15 @@ bool CMakeStep::immutable() const
|
||||
// CMakeBuildStepConfigWidget
|
||||
//
|
||||
|
||||
CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeStep *cmakeStep)
|
||||
: m_cmakeStep(cmakeStep)
|
||||
{
|
||||
QFormLayout *fl = new QFormLayout(this);
|
||||
setLayout(fl);
|
||||
m_arguments = new QLineEdit(this);
|
||||
fl->addRow("Additional arguments", m_arguments);
|
||||
}
|
||||
|
||||
QString CMakeBuildStepConfigWidget::displayName() const
|
||||
{
|
||||
return "CMake";
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include <projectexplorer/buildstep.h>
|
||||
#include <projectexplorer/abstractprocessstep.h>
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -65,8 +67,12 @@ private:
|
||||
class CMakeBuildStepConfigWidget :public ProjectExplorer::BuildStepConfigWidget
|
||||
{
|
||||
public:
|
||||
CMakeBuildStepConfigWidget(CMakeStep *cmakeStep);
|
||||
virtual QString displayName() const;
|
||||
virtual void init(const QString &buildConfiguration);
|
||||
private:
|
||||
CMakeStep *m_cmakeStep;
|
||||
QLineEdit *m_arguments;
|
||||
};
|
||||
|
||||
class CMakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory
|
||||
|
||||
@@ -71,7 +71,7 @@ void MakeStep::run(QFutureInterface<bool> &fi)
|
||||
|
||||
QString MakeStep::name()
|
||||
{
|
||||
return Constants::CMAKESTEP;
|
||||
return Constants::MAKESTEP;
|
||||
}
|
||||
|
||||
QString MakeStep::displayName()
|
||||
|
||||
Reference in New Issue
Block a user