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

@@ -244,6 +244,11 @@ bool McuPackage::writeToSettings() const
return settingsHandler->write(m_settingsKey, m_path, m_defaultPath);
}
void McuPackage::readFromSettings()
{
setPath(settingsHandler->getPath(m_settingsKey, QSettings::UserScope, m_defaultPath));
}
QWidget *McuPackage::widget()
{
auto *widget = new QWidget;