From 04dcfb68cb7e2c3995f0b66b1bbd926b1864819b Mon Sep 17 00:00:00 2001 From: kh Date: Thu, 5 Feb 2015 16:56:10 +0100 Subject: Fix update from 1.6 and earlier to 2.0 installerbase. The update was broken caused by the attribute rename. We already print a warning and read the old value, though we did not set it for the new introduced tags in case of an update. Thus we where not able to read the .ini file and the values stored, but did fallback to the use the initial values from config.xml. Task-number: QTIFW-625 Change-Id: Iad1c96c690de81c5653864a3777c78bd43007249 Reviewed-by: Kai Koehne Reviewed-by: Niels Weber Reviewed-by: Iikka Eklund --- src/libs/installer/settings.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp index 26d0f7600..2cb57b2ca 100644 --- a/src/libs/installer/settings.cpp +++ b/src/libs/installer/settings.cpp @@ -304,13 +304,19 @@ Settings Settings::fromFileAndPrefix(const QString &path, const QString &prefix, } if (!s.d->m_data.contains(scRemoveTargetDir)) s.d->m_data.insert(scRemoveTargetDir, scTrue); - if (s.d->m_data.value(scMaintenanceToolName).toString().isEmpty()) - s.d->m_data.insert(scMaintenanceToolName, QLatin1String("maintenancetool")); + if (s.d->m_data.value(scMaintenanceToolName).toString().isEmpty()) { + s.d->m_data.insert(scMaintenanceToolName, + // TODO: Remove deprecated 'UninstallerName'. + s.d->m_data.value(QLatin1String("UninstallerName"), QLatin1String("maintenancetool")) + .toString()); + } if (s.d->m_data.value(scTargetConfigurationFile).toString().isEmpty()) s.d->m_data.insert(scTargetConfigurationFile, QLatin1String("components.xml")); if (s.d->m_data.value(scMaintenanceToolIniFile).toString().isEmpty()) { - s.d->m_data.insert(scMaintenanceToolIniFile, QString(s.maintenanceToolName() - + QLatin1String(".ini"))); + s.d->m_data.insert(scMaintenanceToolIniFile, + // TODO: Remove deprecated 'UninstallerIniFile'. + s.d->m_data.value(QLatin1String("UninstallerIniFile"), QString(s.maintenanceToolName() + + QLatin1String(".ini"))).toString()); } if (!s.d->m_data.contains(scDependsOnLocalInstallerBinary)) s.d->m_data.insert(scDependsOnLocalInstallerBinary, false); -- cgit v1.2.3