Commit ad6c5db3 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Simplify code a bit

Change-Id: If16aed7a361a00a308570bdafc19ab5c6bb59e36
Reviewed-by: default avatarCristian Adam <cristian.adam@gmail.com>
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent a4563740
......@@ -91,14 +91,14 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog()
{
CMakeProject *project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
CMakeManager *manager = static_cast<CMakeManager *>(project->projectManager());
auto project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
auto manager = static_cast<CMakeManager *>(project->projectManager());
CMakeBuildInfo info(m_buildConfiguration);
CMakeOpenProjectWizard copw(Core::ICore::mainWindow(),
manager, CMakeOpenProjectWizard::ChangeDirectory,
&info,
project->activeTarget()->displayName(),
project->activeTarget()->activeBuildConfiguration()->displayName());
m_buildConfiguration->target()->displayName(),
m_buildConfiguration->displayName());
if (copw.exec() == QDialog::Accepted) {
project->changeBuildDirectory(m_buildConfiguration, copw.buildDirectory());
m_pathLineEdit->setText(m_buildConfiguration->rawBuildDirectory().toString());
......@@ -109,13 +109,13 @@ void CMakeBuildSettingsWidget::runCMake()
{
if (!ProjectExplorer::ProjectExplorerPlugin::saveModifiedFiles())
return;
CMakeProject *project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
CMakeManager *manager = static_cast<CMakeManager *>(project->projectManager());
auto project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
auto manager = static_cast<CMakeManager *>(project->projectManager());
CMakeBuildInfo info(m_buildConfiguration);
CMakeOpenProjectWizard copw(Core::ICore::mainWindow(), manager,
CMakeOpenProjectWizard::WantToUpdate, &info,
project->activeTarget()->displayName(),
project->activeTarget()->activeBuildConfiguration()->displayName());
m_buildConfiguration->target()->displayName(),
m_buildConfiguration->displayName());
if (copw.exec() == QDialog::Accepted)
project->parseCMakeLists();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment