diff options
author | kh <karsten.heimrich@theqtcompany.com> | 2015-02-05 16:56:10 +0100 |
---|---|---|
committer | Niels Weber <niels.weber@theqtcompany.com> | 2015-02-06 08:10:23 +0000 |
commit | 04dcfb68cb7e2c3995f0b66b1bbd926b1864819b (patch) | |
tree | 74c64d320cd07363486d49cd7cd92419953ebd2f /src | |
parent | e8806338184554b39a04d63de4ea7702cc3eef4d (diff) |
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 <kai.koehne@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/installer/settings.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
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); |