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 <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2022-04-12 17:26:41 +02:00
parent d68095fae6
commit 6d681cc5ad

View File

@@ -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);