From 6d681cc5ad36599db5244c1e67fc39874b1b6d9c Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 12 Apr 2022 17:26:41 +0200 Subject: [PATCH] CMakePM: Remove unnecessary settings header stretch() calls These calls would make interactive changes useless and the fake hide event would remove the interactive flag which would prevent the user from doing any changes. Fixes: QTCREATORBUG-27257 Change-Id: I80a53d8955ac2329c726989954f1d910e93b3501 Reviewed-by: Alessandro Portale --- .../cmakeprojectmanager/cmakebuildconfiguration.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 05399d00ad4..6bd0fed36a9 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -257,7 +257,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) m_configView->setUniformRowHeights(true); m_configView->setSortingEnabled(true); m_configView->sortByColumn(0, Qt::AscendingOrder); - auto stretcher = new HeaderViewStretcher(m_configView->header(), 0); + (void) new HeaderViewStretcher(m_configView->header(), 0); m_configView->setSelectionMode(QAbstractItemView::ExtendedSelection); m_configView->setSelectionBehavior(QAbstractItemView::SelectItems); m_configView->setAlternatingRowColors(true); @@ -371,18 +371,15 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) m_configModel->setConfiguration(m_buildConfiguration->configurationFromCMake()); m_configModel->setInitialParametersConfiguration( m_buildConfiguration->initialCMakeConfiguration()); - m_configView->expandAll(); } - connect(bc->buildSystem(), &BuildSystem::parsingFinished, this, [this, stretcher] { + connect(bc->buildSystem(), &BuildSystem::parsingFinished, this, [this] { m_configModel->setConfiguration(m_buildConfiguration->configurationFromCMake()); m_configModel->setInitialParametersConfiguration( m_buildConfiguration->initialCMakeConfiguration()); m_buildConfiguration->filterConfigArgumentsFromAdditionalCMakeArguments(); updateFromKit(); - m_configView->expandAll(); m_configView->setEnabled(true); - stretcher->stretch(); updateButtonState(); m_showProgressTimer.stop(); m_progressIndicator->hide(); @@ -400,10 +397,6 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) m_progressIndicator->hide(); updateConfigurationStateSelection(); }); - connect(m_configTextFilterModel, &QAbstractItemModel::modelReset, this, [this, stretcher]() { - m_configView->expandAll(); - stretcher->stretch(); - }); connect(m_configModel, &QAbstractItemModel::dataChanged, this, &CMakeBuildSettingsWidget::updateButtonState);