Merge remote-tracking branch 'origin/8.0'

Change-Id: Icbb87ac8bcee5fb86042d3863a973573510651b4
This commit is contained in:
hjk
2022-08-05 08:48:22 +02:00
31 changed files with 440 additions and 380 deletions

View File

@@ -434,6 +434,7 @@ public:
private:
void updateQchFilePath();
void reload();
CMakeToolItemModel *m_model;
QLineEdit *m_displayNameLineEdit;
@@ -479,8 +480,8 @@ CMakeToolItemConfigWidget::CMakeToolItemConfigWidget(CMakeToolItemModel *model)
connect(m_binaryChooser, &PathChooser::rawPathChanged, this, [this]() {
updateQchFilePath();
m_qchFileChooser->setBaseDirectory(m_binaryChooser->filePath().parentDir());
store();
reload();
});
connect(m_qchFileChooser, &PathChooser::rawPathChanged, this, &CMakeToolItemConfigWidget::store);
connect(m_displayNameLineEdit, &QLineEdit::textChanged, this, &CMakeToolItemConfigWidget::store);
@@ -504,6 +505,18 @@ void CMakeToolItemConfigWidget::updateQchFilePath()
m_qchFileChooser->setFilePath(CMakeTool::searchQchFile(m_binaryChooser->filePath()));
}
void CMakeToolItemConfigWidget::reload()
{
if (!m_id.isValid())
return;
const CMakeToolTreeItem *item = m_model->cmakeToolItem(m_id);
if (!item)
return;
load(item);
}
void CMakeToolItemConfigWidget::load(const CMakeToolTreeItem *item)
{
m_loadingItem = true; // avoid intermediate signal handling