forked from qt-creator/qt-creator
McuSupport: Make some functions in McuSupportOptions static
There is no good enough reason to have them non-static, and upcoming changes will have it a bit easier with static calls. Additionally, make McuTarget::m_toolChainPackage const. Change-Id: I002d5d56606d3b43c4c7a2f63c59e97a81342c69 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -168,7 +168,7 @@ void McuSupportOptionsWidget::updateStatus()
|
||||
mcuTargetValid ? QString::fromLatin1(
|
||||
"A kit <b>%1</b> for the selected target can be "
|
||||
"generated. Press Apply to generate it.")
|
||||
.arg(m_options.kitName(mcuTarget))
|
||||
.arg(McuSupportOptions::kitName(mcuTarget))
|
||||
: "Provide the package paths in order to create a kit "
|
||||
"for your target.");
|
||||
}
|
||||
@@ -237,9 +237,9 @@ void McuSupportOptionsWidget::apply()
|
||||
if (!mcuTarget)
|
||||
return;
|
||||
|
||||
for (auto existingKit : m_options.existingKits(mcuTarget))
|
||||
for (auto existingKit : McuSupportOptions::existingKits(mcuTarget))
|
||||
ProjectExplorer::KitManager::deregisterKit(existingKit);
|
||||
m_options.newKit(mcuTarget);
|
||||
McuSupportOptions::newKit(mcuTarget, m_options.qtForMCUsSdkPackage);
|
||||
}
|
||||
|
||||
void McuSupportOptionsWidget::populateMcuTargetsComboBox()
|
||||
@@ -247,8 +247,8 @@ void McuSupportOptionsWidget::populateMcuTargetsComboBox()
|
||||
m_options.populatePackagesAndTargets();
|
||||
m_mcuTargetsComboBox->clear();
|
||||
m_mcuTargetsComboBox->addItems(
|
||||
Utils::transform<QStringList>(m_options.mcuTargets, [this](McuTarget *t){
|
||||
return m_options.kitName(t);
|
||||
Utils::transform<QStringList>(m_options.mcuTargets, [](McuTarget *t) {
|
||||
return McuSupportOptions::kitName(t);
|
||||
}));
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user