McuSupport: Do not try to handle non-existing targets

Silences the warning message box if Mcu settings page had been
opened and stays unconfigured, but Ok or Apply is used to close
the settings dialog.

Change-Id: I28179b7e7d306bfb08e8066982548ca6b954120d
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Christian Stenger
2023-05-26 10:27:39 +02:00
parent 723b71e897
commit 07fbf12574

View File

@@ -316,6 +316,9 @@ void McuSupportOptionsWidget::apply()
m_settingsHandler->setAutomaticKitCreation(m_options.automaticKitCreationEnabled());
m_options.sdkRepository.expandVariablesAndWildcards();
if (m_mcuTargetsComboBox->count() == 0)
return;
QMessageBox warningPopup(QMessageBox::Icon::Warning,
Tr::tr("Warning"),
Tr::tr("Unable to apply changes in Devices > MCU."),