Fix setValue saving in restart

When running maintenancetool and installing a component that sets a value
in installscript with setValue, the value is cleared when pressing
'Restart'.

Task-number:QTIFW-504

Change-Id: Ie588b6f1011d7b50b771ea8ee0dea99350f65878
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
This commit is contained in:
Katja Marttila 2015-11-23 14:03:05 +02:00
parent a4b1484352
commit f3e46570a6
3 changed files with 13 additions and 3 deletions

View File

@ -267,11 +267,15 @@ int InstallerBase::run()
controller.setManagerParams(params);
controller.setControlScript(controlScript);
if (m_core->isInstaller())
if (m_core->isInstaller()) {
controller.setGui(new InstallerGui(m_core));
else
}
else {
controller.setGui(new MaintenanceGui(m_core));
//Start listening to setValue changes that newly installed components might have
connect(m_core, &QInstaller::PackageManagerCore::valueChanged, &controller,
&TabController::updateManagerParams);
}
QInstaller::PackageManagerCore::Status status =
QInstaller::PackageManagerCore::Status(controller.init());
if (status != QInstaller::PackageManagerCore::Success)

View File

@ -204,3 +204,8 @@ void TabController::onNetworkSettingsChanged(const QInstaller::Settings &setting
d->m_settings = settings;
d->m_networkSettingsChanged = true;
}
void TabController::updateManagerParams(const QString &key, const QString &value)
{
d->m_params.insert(key, value);
}

View File

@ -62,6 +62,7 @@ public:
public Q_SLOTS:
int init();
void updateManagerParams(const QString &key, const QString &value);
private Q_SLOTS:
void restartWizard();