diff options
author | Cristian Adam <cristian.adam@qt.io> | 2022-12-12 20:02:01 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2023-01-05 14:37:50 +0000 |
commit | 2f39b51bdc1f73e2d87cc641a8501fd04ee76b4f (patch) | |
tree | 8d89b1372574dfb50699a556095669c1f7dba8e3 /src/plugins/cmakeprojectmanager/cmakesettingspage.cpp | |
parent | 2a2455a6fa610944cb19a5cca78137b264e4d25f (diff) | |
download | qt-creator-2f39b51bdc1f73e2d87cc641a8501fd04ee76b4f.tar.gz |
CMakePM: Make "Autorun CMake" a global setting
The "Autorun CMake" is only visible in the Tools settings page when
the user clicks on CMake tool.
This is not very visible and it doesn't have to be per CMake version.
Change-Id: I57ded0b2e6a3ecb731bb8bc1495b6b61bc04c8b6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakesettingspage.cpp')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakesettingspage.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp index 4e9bb6a24a..317e4c10f3 100644 --- a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp +++ b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp @@ -58,8 +58,7 @@ public: void updateCMakeTool(const Utils::Id &id, const QString &displayName, const FilePath &executable, - const FilePath &qchFile, - bool autoRun); + const FilePath &qchFile); void removeCMakeTool(const Utils::Id &id); void apply(); @@ -82,7 +81,6 @@ public: , m_qchFile(item->qchFilePath()) , m_versionDisplay(item->versionDisplay()) , m_detectionSource(item->detectionSource()) - , m_isAutoRun(item->isAutoRun()) , m_autodetected(item->isAutoDetected()) , m_isSupported(item->hasFileApi()) , m_changed(changed) @@ -280,8 +278,7 @@ void CMakeToolItemModel::reevaluateChangedFlag(CMakeToolTreeItem *item) const void CMakeToolItemModel::updateCMakeTool(const Id &id, const QString &displayName, const FilePath &executable, - const FilePath &qchFile, - bool autoRun) + const FilePath &qchFile) { CMakeToolTreeItem *treeItem = cmakeToolItem(id); QTC_ASSERT(treeItem, return ); @@ -289,7 +286,6 @@ void CMakeToolItemModel::updateCMakeTool(const Id &id, treeItem->m_name = displayName; treeItem->m_executable = executable; treeItem->m_qchFile = qchFile; - treeItem->m_isAutoRun = autoRun; treeItem->updateErrorFlags(); @@ -331,7 +327,6 @@ void CMakeToolItemModel::apply() cmake->setFilePath(item->m_executable); cmake->setQchFilePath(item->m_qchFile); cmake->setDetectionSource(item->m_detectionSource); - cmake->setAutorun(item->m_isAutoRun); } else { toRegister.append(item); } @@ -399,7 +394,6 @@ private: CMakeToolItemModel *m_model; QLineEdit *m_displayNameLineEdit; - QCheckBox *m_autoRunCheckBox; PathChooser *m_binaryChooser; PathChooser *m_qchFileChooser; QLabel *m_versionLabel; @@ -428,24 +422,17 @@ CMakeToolItemConfigWidget::CMakeToolItemConfigWidget(CMakeToolItemModel *model) m_versionLabel = new QLabel(this); - m_autoRunCheckBox = new QCheckBox; - m_autoRunCheckBox->setText(Tr::tr("Autorun CMake")); - m_autoRunCheckBox->setToolTip(Tr::tr("Automatically run CMake after changes to CMake project files.")); - auto formLayout = new QFormLayout(this); formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); formLayout->addRow(new QLabel(Tr::tr("Name:")), m_displayNameLineEdit); formLayout->addRow(new QLabel(Tr::tr("Path:")), m_binaryChooser); formLayout->addRow(new QLabel(Tr::tr("Version:")), m_versionLabel); formLayout->addRow(new QLabel(Tr::tr("Help file:")), m_qchFileChooser); - formLayout->addRow(m_autoRunCheckBox); connect(m_binaryChooser, &PathChooser::browsingFinished, this, &CMakeToolItemConfigWidget::onBinaryPathEditingFinished); connect(m_binaryChooser, &PathChooser::editingFinished, this, &CMakeToolItemConfigWidget::onBinaryPathEditingFinished); connect(m_qchFileChooser, &PathChooser::rawPathChanged, this, &CMakeToolItemConfigWidget::store); connect(m_displayNameLineEdit, &QLineEdit::textChanged, this, &CMakeToolItemConfigWidget::store); - connect(m_autoRunCheckBox, &QCheckBox::toggled, - this, &CMakeToolItemConfigWidget::store); } void CMakeToolItemConfigWidget::store() const @@ -454,8 +441,7 @@ void CMakeToolItemConfigWidget::store() const m_model->updateCMakeTool(m_id, m_displayNameLineEdit->text(), m_binaryChooser->filePath(), - m_qchFileChooser->filePath(), - m_autoRunCheckBox->checkState() == Qt::Checked); + m_qchFileChooser->filePath()); } void CMakeToolItemConfigWidget::onBinaryPathEditingFinished() @@ -493,8 +479,6 @@ void CMakeToolItemConfigWidget::load(const CMakeToolTreeItem *item) m_versionLabel->setText(item->m_versionDisplay); - m_autoRunCheckBox->setChecked(item->m_isAutoRun); - m_id = item->m_id; m_loadingItem = false; } |