From 50575212455fbd3109adbe92d8509fca3c51850a Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Tue, 10 Jan 2023 14:17:21 +0200 Subject: Support detecting invalid dependency resolutions on component selection IFW could already previously detect circular and missing dependencies by running a precheck calculation when building the component tree. However, there can be also cases of where the user selection results in unsolvable changes to components. One such case was the erroneous possibility to uninstall a component marked with ForcedInstallation, if any of its dependencies was checkable and the user unselected it for uninstallation. Add support for reacting to such errors in the component tree view, displaying a message box about the invalid dependency resolvation error, and blocking further navigation until the component selection passes the dependency calculations. Also attempt some refactoring the related code to simplify the different call sequences resulting in recalculation of the components. Change-Id: I9dc78f858bd4be7932f89f8e14bbfd97fbd3a0f6 Reviewed-by: Katja Marttila --- doc/scripting-api/packagemanagercore.qdoc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'doc/scripting-api/packagemanagercore.qdoc') diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc index b14fd957f..ac6830d33 100644 --- a/doc/scripting-api/packagemanagercore.qdoc +++ b/doc/scripting-api/packagemanagercore.qdoc @@ -324,16 +324,26 @@ Cancels the retrieval of meta information from a remote repository. */ +/*! + \qmlmethod boolean installer::recalculateAllComponents() + + Recalculates all components to install and uninstall. Returns \c true + on success, \c false otherwise. +*/ + /*! \qmlmethod void installer::componentsToInstallNeedsRecalculation() + \deprecated [4.5] Use recalculateAllComponents() instead. Ensures that component dependencies are re-calculated. */ /*! \qmlmethod void installer::clearComponentsToInstallCalculated() - - Forces a recalculation of components to install. + \deprecated [4.5] Installer framework recalculates components each time the calculation + of components to install is requested, so there is no need to call this anymore, and the + method does nothing. On previous versions calling this forced a recalculation of + components to install. */ /*! -- cgit v1.2.3