summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2013-01-31 11:45:24 +0100
committerTim Jenssen <tim.jenssen@digia.com>2013-01-31 11:47:42 +0100
commita321c3c547bbf7b214e98db84ce7b450df0c4ff5 (patch)
treeb6a5b9aed67775cd132c186bbf62a5b0752d2f47 /src/libs
parent525a757158c3a4174f75cf0c97422129117989b2 (diff)
Force overwriting wrong initial values.
Task-number: QTIFW-218 Change-Id: I77f7d032f12614d4ba07004ccd49428424011714 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/packagemanagercore_p.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp
index 4f8a851f2..78c192946 100644
--- a/src/libs/installer/packagemanagercore_p.cpp
+++ b/src/libs/installer/packagemanagercore_p.cpp
@@ -571,12 +571,15 @@ void PackageManagerCorePrivate::initialize(const QHash<QString, QString> &params
KDUpdater::PackagesInfo &packagesInfo = *m_updaterApplication.packagesInfo();
packagesInfo.setFileName(componentsXmlPath());
- if (packagesInfo.applicationName().isEmpty()) {
+ // Note: force overwriting the application name and version in case we run as installer. Both will be
+ // set to wrong initial values if we install into an already existing installation. This can happen
+ // if the components.xml path has not been changed, but name or version of the new installer.
+ if (isInstaller() || packagesInfo.applicationName().isEmpty()) {
// TODO: this seems to be wrong, we should ask for ProductName defaulting to applicationName...
packagesInfo.setApplicationName(m_data.settings().applicationName());
}
- if (packagesInfo.applicationVersion().isEmpty()) {
+ if (isInstaller() || packagesInfo.applicationVersion().isEmpty()) {
// TODO: this seems to be wrong, we should ask for ProductVersion defaulting to applicationVersion...
packagesInfo.setApplicationVersion(m_data.settings().applicationVersion());
}