McuSupport: move auto-kit-creation option to McuSupportOptions

It was part of McuPackage, and only used by the SDK instance.

Task-number: QTCREATORBUG-27093
Change-Id: I9d9eaac621e9997129c227fae3ac88b502ba4340
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Christiaan Janssen
2022-02-21 13:41:57 +01:00
parent eccbc0fbcc
commit e4da779653
8 changed files with 39 additions and 49 deletions

View File

@@ -146,7 +146,7 @@ McuSupportOptionsWidget::McuSupportOptionsWidget()
m_kitAutomaticCreationCheckBox = new QCheckBox(
tr("Automatically create kits for all available targets on start"));
connect(m_kitAutomaticCreationCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
m_options.qtForMCUsSdkPackage->setAutomaticKitCreationEnabled(
m_options.setAutomaticKitCreationEnabled(
state == Qt::CheckState::Checked);
});
mainLayout->addWidget(m_kitAutomaticCreationCheckBox);
@@ -245,8 +245,7 @@ void McuSupportOptionsWidget::updateStatus()
}
// Automatic Kit creation
m_kitAutomaticCreationCheckBox->setChecked(
m_options.qtForMCUsSdkPackage->automaticKitCreationEnabled());
m_kitAutomaticCreationCheckBox->setChecked(m_options.automaticKitCreationEnabled());
// Status label in the bottom
{
@@ -300,7 +299,7 @@ void McuSupportOptionsWidget::apply()
{
bool pathsChanged = false;
m_options.qtForMCUsSdkPackage->writeGeneralSettings();
m_options.writeGeneralSettings();
pathsChanged |= m_options.qtForMCUsSdkPackage->writeToSettings();
for (auto package : qAsConst(m_options.sdkRepository.packages))
pathsChanged |= package->writeToSettings();