From 07fbf12574fab14a51a9c36d8f98933ff1813014 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 26 May 2023 10:27:39 +0200 Subject: [PATCH] McuSupport: Do not try to handle non-existing targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Yasser Grimes Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcusupportoptionspage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/mcusupport/mcusupportoptionspage.cpp b/src/plugins/mcusupport/mcusupportoptionspage.cpp index a05a3771b07..b303a7acae9 100644 --- a/src/plugins/mcusupport/mcusupportoptionspage.cpp +++ b/src/plugins/mcusupport/mcusupportoptionspage.cpp @@ -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."),