summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore_p.cpp
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2023-02-02 15:24:39 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2023-02-03 10:10:07 +0200
commiteaa5b874e6ea47f3ec8692a401e38156e63b5f5b (patch)
tree35db0c5e9255af90f8bee2d809d99a9abfe59d3a /src/libs/installer/packagemanagercore_p.cpp
parentdb2d27e29b526a6e1439be721a24a9ec5166d81a (diff)
Fix updating of install action states for components
The states were only updated at the end of PackageManagerCore ::recalculateAllComponents() method - the method calls: PackageManagerCore::calculateComponentsToInstall() and PackageManagerCore::calculateComponentsToUninstall() functions in that order, and both emit signals indicating the finishing of the calculation. Any install script connecting to these signals that relies on the correct state of the install actions for the components would work incorrectly, as the state was not updated to reflect the calculation result yet. Fix by updating the install action state in both functions before emitting their finished signals. Also rename the function to better distinguish its purpose from updating the check state of the components. Task-number: QTIFW-2976 Change-Id: I67cd88478c39215ec124a5451c1f29a63cb1c82c Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagercore_p.cpp')
-rw-r--r--src/libs/installer/packagemanagercore_p.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp
index 6d56791a0..cce093dc2 100644
--- a/src/libs/installer/packagemanagercore_p.cpp
+++ b/src/libs/installer/packagemanagercore_p.cpp
@@ -2922,7 +2922,7 @@ void PackageManagerCorePrivate::storeCheckState()
m_coreCheckedHash.insert(component, component->checkState());
}
-void PackageManagerCorePrivate::updateComponentCheckedState()
+void PackageManagerCorePrivate::updateComponentInstallActions()
{
for (Component *component : m_core->components(PackageManagerCore::ComponentType::All)) {
component->setInstallAction(component->isInstalled()