From 2d9dde30dc46de5bf17c8987a9d801854a50175e Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 22 Dec 2021 19:58:11 +0100 Subject: [PATCH] CMakePM: Remove "Clear selection" button in Settings The "Clear selection" button doesn't add much value in the list of buttons. If you have a selection it doesn't really matter, and you can simply click on an item an the new item will be the new selection. Change-Id: Ie64bc379773219392c12da4c256afd462d4081a9 Reviewed-by: Reviewed-by: Eike Ziller --- .../cmakeprojectmanager/cmakebuildconfiguration.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 6ff7feed5c2..fe7044f8d88 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -141,7 +141,6 @@ private: QPushButton *m_setButton; QPushButton *m_unsetButton; QPushButton *m_resetButton; - QPushButton *m_clearSelectionButton; QCheckBox *m_showAdvancedCheckBox; QPushButton *m_reconfigureButton; QTimer m_showProgressTimer; @@ -309,10 +308,6 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) m_resetButton->setToolTip(tr("Reset all unapplied changes.")); m_resetButton->setEnabled(false); - m_clearSelectionButton = new QPushButton(tr("Clear Selection")); - m_clearSelectionButton->setToolTip(tr("Clear selection.")); - m_clearSelectionButton->setEnabled(false); - m_batchEditButton = new QPushButton(tr("Batch Edit...")); m_batchEditButton->setToolTip(tr("Set or reset multiple values in the CMake Configuration.")); @@ -335,7 +330,6 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) m_editButton, m_setButton, m_unsetButton, - m_clearSelectionButton, m_resetButton, m_batchEditButton, Space(10), @@ -434,9 +428,6 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) m_configView->setCurrentIndex(idx); m_configView->edit(idx); }); - connect(m_clearSelectionButton, &QPushButton::clicked, this, [this]() { - m_configView->selectionModel()->clear(); - }); connect(addButtonMenu, &QMenu::triggered, this, [this](QAction *action) { ConfigModel::DataItem::Type type = static_cast(action->data().value()); @@ -686,7 +677,6 @@ void CMakeBuildSettingsWidget::updateSelection() editableCount++; } - m_clearSelectionButton->setEnabled(!selectedIndexes.isEmpty()); m_setButton->setEnabled(setableCount > 0); m_unsetButton->setEnabled(unsetableCount > 0); m_editButton->setEnabled(editableCount == 1);