CMakeSettingsPage: Reload data on CMake executable path edit finished

This fixes missing/outdated 'Version' information and maybe useful
for more data later.

Ammends commit 057bb3095b

Change-Id: I2d3976fd396ec440e3fa7b67af008175ab4c9048
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alexander Akulich
2022-08-11 21:44:26 +03:00
parent 2770f92f53
commit 7c7fdf6460

View File

@@ -433,6 +433,7 @@ public:
void store() const;
private:
void onBinaryPathEditingFinished();
void updateQchFilePath();
void reload();
@@ -478,11 +479,8 @@ CMakeToolItemConfigWidget::CMakeToolItemConfigWidget(CMakeToolItemModel *model)
formLayout->addRow(new QLabel(tr("Help file:")), m_qchFileChooser);
formLayout->addRow(m_autoRunCheckBox);
connect(m_binaryChooser, &PathChooser::rawPathChanged, this, [this]() {
updateQchFilePath();
store();
reload();
});
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,
@@ -499,6 +497,13 @@ void CMakeToolItemConfigWidget::store() const
m_autoRunCheckBox->checkState() == Qt::Checked);
}
void CMakeToolItemConfigWidget::onBinaryPathEditingFinished()
{
updateQchFilePath();
store();
reload();
}
void CMakeToolItemConfigWidget::updateQchFilePath()
{
if (m_qchFileChooser->filePath().isEmpty())