Cmake: Add a "Reconfigure project" to the Project Page

This commit is contained in:
dt
2010-09-02 13:57:14 +02:00
parent 6650275e76
commit 5fae9b94c0
4 changed files with 41 additions and 9 deletions

View File

@@ -623,6 +623,13 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeProject *project)
fl->setContentsMargins(20, -1, 0, -1);
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
setLayout(fl);
// TODO add action to Build menu?
QPushButton *runCmakeButton = new QPushButton("Run cmake");
connect(runCmakeButton, SIGNAL(clicked()),
this, SLOT(runCMake()));
fl->addRow(tr("Reconfigure project:"), runCmakeButton);
m_pathLineEdit = new QLineEdit(this);
m_pathLineEdit->setReadOnly(true);
@@ -664,6 +671,19 @@ void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog()
}
}
void CMakeBuildSettingsWidget::runCMake()
{
// TODO skip build directory
CMakeOpenProjectWizard copw(m_project->projectManager(),
m_project->projectDirectory(),
m_buildConfiguration->buildDirectory(),
CMakeOpenProjectWizard::WantToUpdate,
m_buildConfiguration->environment());
if (copw.exec() == QDialog::Accepted) {
m_project->parseCMakeLists();
}
}
/////
// CMakeCbpParser
////