From fc0b26f4d202776456ceca1be4206739a8be9247 Mon Sep 17 00:00:00 2001 From: Frerich Raabe Date: Tue, 21 Jun 2016 13:35:35 +0200 Subject: Make support for modifying installations configurable This patch introduces support for a new setting 'SupportsModify' in the config.xml file. This is only relevant for Windows installers. By default (i.e. when omitting) this setting, it defaults to 'true' which means that the product supports modifying (i.e. reconfiguring) an existing installations. As such, the 'Modify' button show in Windows' list of installed programs will be enabled. Setting this to 'false' will cause the button to be disabled. Change-Id: I4105f3f0bce67830aa2ee8ae0e6f6abb25c35b30 Reviewed-by: Karsten Heimrich --- src/libs/installer/packagemanagercore_p.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/libs/installer/packagemanagercore_p.cpp') diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index 76294ec69..019bbfe78 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -2035,7 +2035,13 @@ void PackageManagerCorePrivate::registerMaintenanceTool() const quint64 limit = std::numeric_limits::max(); // maximum 32 bit value if (estimatedSizeKB <= limit) settings.setValue(QLatin1String("EstimatedSize"), static_cast(estimatedSizeKB)); - settings.setValue(QLatin1String("NoModify"), 0); + + const bool supportsModify = m_core->value(scSupportsModify, scTrue) == scTrue; + if (supportsModify) + settings.setValue(QLatin1String("NoModify"), 0); + else + settings.setValue(QLatin1String("NoModify"), 1); + settings.setValue(QLatin1String("NoRepair"), 1); #endif } -- cgit v1.2.3