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) ...@@ -91,14 +91,14 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog() void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog()
{ {
CMakeProject *project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project()); auto project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
CMakeManager *manager = static_cast<CMakeManager *>(project->projectManager()); auto manager = static_cast<CMakeManager *>(project->projectManager());
CMakeBuildInfo info(m_buildConfiguration); CMakeBuildInfo info(m_buildConfiguration);
CMakeOpenProjectWizard copw(Core::ICore::mainWindow(), CMakeOpenProjectWizard copw(Core::ICore::mainWindow(),
manager, CMakeOpenProjectWizard::ChangeDirectory, manager, CMakeOpenProjectWizard::ChangeDirectory,
&info, &info,
project->activeTarget()->displayName(), m_buildConfiguration->target()->displayName(),
project->activeTarget()->activeBuildConfiguration()->displayName()); m_buildConfiguration->displayName());
if (copw.exec() == QDialog::Accepted) { if (copw.exec() == QDialog::Accepted) {
project->changeBuildDirectory(m_buildConfiguration, copw.buildDirectory()); project->changeBuildDirectory(m_buildConfiguration, copw.buildDirectory());
m_pathLineEdit->setText(m_buildConfiguration->rawBuildDirectory().toString()); m_pathLineEdit->setText(m_buildConfiguration->rawBuildDirectory().toString());
...@@ -109,13 +109,13 @@ void CMakeBuildSettingsWidget::runCMake() ...@@ -109,13 +109,13 @@ void CMakeBuildSettingsWidget::runCMake()
{ {
if (!ProjectExplorer::ProjectExplorerPlugin::saveModifiedFiles()) if (!ProjectExplorer::ProjectExplorerPlugin::saveModifiedFiles())
return; return;
CMakeProject *project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project()); auto project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
CMakeManager *manager = static_cast<CMakeManager *>(project->projectManager()); auto manager = static_cast<CMakeManager *>(project->projectManager());
CMakeBuildInfo info(m_buildConfiguration); CMakeBuildInfo info(m_buildConfiguration);
CMakeOpenProjectWizard copw(Core::ICore::mainWindow(), manager, CMakeOpenProjectWizard copw(Core::ICore::mainWindow(), manager,
CMakeOpenProjectWizard::WantToUpdate, &info, CMakeOpenProjectWizard::WantToUpdate, &info,
project->activeTarget()->displayName(), m_buildConfiguration->target()->displayName(),
project->activeTarget()->activeBuildConfiguration()->displayName()); m_buildConfiguration->displayName());
if (copw.exec() == QDialog::Accepted) if (copw.exec() == QDialog::Accepted)
project->parseCMakeLists(); 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