summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/uninstallercalculator.h
Commit message (Collapse)AuthorAgeFilesLines
* Add common base class for the installer calculator classesArttu Tarkiainen2023-02-081-27/+9
| | | | | | | | As the classes already share similar features and public API, it would make sense to inherit a common abstract class to define the interface. Change-Id: I7ed278b1b049b7ec12c4401e55fdf39306b0ab85 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Remove unused component calculation codeArttu Tarkiainen2023-01-311-1/+0
| | | | | Change-Id: Ie8e00f148e0d079db5a8d4c49216cfe81720f7c5 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Support detecting invalid dependency resolutions on component selectionArttu Tarkiainen2023-01-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | 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 <katja.marttila@qt.io>
* Cleanup installer calculator classesKatja Marttila2022-11-301-8/+6
| | | | | | | | | | | | | | As there are several optimizations done, the single click of component in component selection tree is not slow anymore. Cleaning the code so it is easier to maintain. Basically this revers commit a28cf55b5a5007c0dd952b3012c076d9da329f0f but as there are bug fixes made after that so pure revert could not be done. Task-number: QTIFW-2885 Change-Id: Id486d5dc68c42c31b4848cd19a1761bcfe242db6 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix virtual component uninstallationKatja Marttila2022-11-041-1/+2
| | | | | | | | | | Virtual components were still wrongly calculated for uninstall depending on which order the tree was clicked and whether the component had dependencies to already installed components or components about to be installed. Change-Id: I624fd1139d15d5e16c81365064dcea2392dc13b1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Do not install new dependencies for installed componentsKatja Marttila2022-05-161-2/+2
| | | | | | | | | | | | | | | | If component is updated to repository, and new dependencies are added, the dependencies should be installed only when fresh install to component is made or the component is updated. This change adds a new LocalDependencies value to component. It keeps track of the dependencies the local installed packages has. Fixes also a bug in uninstallecalculator, where we should also read the dependencies from local installed packages instead of newly introduced repositories. Task-number: QTIFW-2624 Change-Id: I0557e5adf1e87c0a1238cc455cfb2c90f6b05c87 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add documentation for typedefs AutoDependencyHash and DependencyHashKatja Marttila2022-05-021-4/+5
| | | | | | | | Also use the typedefs in the code when possible. Change-Id: Ie5aa55997051afc864de87d58a10db1c33312ff2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Speed up component selection in component selection pagesKatja Marttila2022-04-281-6/+13
| | | | | | | | | | | | | | | | | If a lot of components are installed, maintenancetool was slow to select/unselect a single component. This was caused because the whole tree's components were recalculated. Fixed so that only the selected/unselected components and their dependencies and autodependencies are recalculated instead of whole tree. This change speeds up clicking tree item from zero to 90 percent, depending on how much components are already installed. The more components are installed as autodependency, the slower it gets to select the items. Task-number: QTIFW-2522 Change-Id: I5e824aed8787fd7ecdce72b15a1b13848f0a3923 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Add install reason why component is uninstalledKatja Marttila2022-03-241-0/+16
| | | | | | | | | | In details view uninstallable and installable components are listed. For installable components a reason is shown why the component is installed. Added similar kind of message for uninstallable components as well. Task-number: QTIFW-2581 Change-Id: Idbf31200793a6c89a4ed4a6fc115f49889b5f9b5 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Do not uninstall needed virtual dependenciesKatja Marttila2022-03-181-1/+1
| | | | | | | | | | | | | | | Virtual dependencies are uninstalled if all dependencies to the component is removed. Virtual dependencies were calculated using recent components in repository, which is wrong as the dependencies may have changed in the repository, causing the dependencies to be uninstalled although those are still needed. Fixed so that the uninstallable virtual components are calculated from repository components if the component is going to be updated, otherwise the dependeny is calculated from the local installed packages. Task-number: QTIFW-2573 Change-Id: If9cc59fa7f453d502ec1883f27273ef604128a6e Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Make Updater -view checkbox selection fasterKatja Marttila2022-01-191-2/+4
| | | | | | | | | | If there are lot of components installed, querying core from component caused unnecessary performance hit. Also replaced the foreach keyword with the preferred C++ range-based loop Task-number: QTIFW-1021 Change-Id: I961439ba14f26fee21f201769a71319b4b98d14b Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Remove double calculation of uninstall componentsKatja Marttila2021-01-201-0/+1
| | | | | | | | | | This speeds up selecting/unselecting items in updater view around 25 procent. Task-number: QTIFW-1021 Change-Id: Ia50f7f1d47da0f03fbd6d66b6e78482225545230 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* License header update to GPL-EXCEPTKatja Marttila2017-01-261-17/+12
| | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
* Update license headersIikka Eklund2015-12-291-4/+3
| | | | | | | | | Update existing license headers. LGPL -> LGPLv21. Update copyright year as well. Change-Id: Ie1d71f8c68186b8f625f409ddf94691f178093c9 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Fix the uninstaller calculatorjkobus2014-11-041-2/+2
| | | | | | | | Don't include dependencies which were not installed before. Fix the "Cascade dependencies" test of "solver". Change-Id: I807503840af5c841cde89fdbbfc3f6932d4787b8 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Add LGPLv3 as new licenseKai Koehne2014-10-161-14/+7
| | | | | | | Change-Id: I61158f956894e209dccf83744b4753774676099d Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* Move the uninstallation calculations into UninstallerCalculatorjkobus2014-10-101-0/+75
Change-Id: I1b398815414430c2fab9a5c611b44e3a92c2fb39 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>