McuSupport: Discard un-applied changes to Qul SDK package

The path to the Qul SDK entered in the settings path persisted in
the UI when re-opening the settings page, even if it was not
applied. Kits and the settings file are not affected unless
pressing apply so this did not affect functionality. Un-applied
changes are discarded by re-reading the path from the settings
file in the constructor for the settings page.

Task-number: QTCREATORBUG-28568
Change-Id: Id03be22fba429e4764493cd3bedf45faa6908637
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Sivert Krøvel
2023-02-09 17:35:44 +01:00
parent 0f0e9baff6
commit 53a72f0ba3
5 changed files with 11 additions and 0 deletions

View File

@@ -90,6 +90,9 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(McuSupportOptions &options,
m_qtForMCUsSdkGroupBox = new QGroupBox(Tr::tr("Qt for MCUs SDK"));
m_qtForMCUsSdkGroupBox->setFlat(true);
auto *layout = new QVBoxLayout(m_qtForMCUsSdkGroupBox);
// Re-read the qtForMCUs package from settings to discard un-applied changes from previous sessions
m_options.qtForMCUsSdkPackage->readFromSettings();
layout->addWidget(m_options.qtForMCUsSdkPackage->widget());
mainLayout->addWidget(m_qtForMCUsSdkGroupBox);
}