summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/packagemanagercore_p.cpp')
-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());
}