mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-04-26 21:54:31 +00:00
Fix recalculation of components to install in MaintenanceTool
In MaintenanceTool, navigating back and forth in "Update" and "Add or remove components" doesn't cause update in components to install and uninstall information. Without changing component model's state by checking/unchecking components the recalculating is not done and performing the opposite maintainer action causes unintended results. Make IFW recalculate components to install when leaving component selection page so InstallerCalculator and UninstallerCalculator's state is correct even without changing the component selection. Task-number: QTIFW-694 Change-Id: I89abd9a1952fe30d1e3ae4012e7a7bac68793a89 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
This commit is contained in:
parent
1ae7ad5c68
commit
120e527ed1
@ -147,6 +147,10 @@ ComponentSelectionPagePrivate::ComponentSelectionPagePrivate(ComponentSelectionP
|
||||
|
||||
m_treeViewVLayout->addWidget(m_treeView, 3);
|
||||
|
||||
// force a recalculation of components to install to keep the state correct
|
||||
connect(q, &ComponentSelectionPage::left,
|
||||
m_core, &PackageManagerCore::clearComponentsToInstallCalculated);
|
||||
|
||||
m_mainHLayout = new QHBoxLayout(q);
|
||||
m_mainHLayout->addLayout(m_treeViewVLayout, 3);
|
||||
m_mainHLayout->addLayout(m_descriptionVLayout, 2);
|
||||
|
@ -536,6 +536,14 @@ void PackageManagerCore::componentsToInstallNeedsRecalculation()
|
||||
component->updateUncompressedSize(); // this is a recursive call
|
||||
}
|
||||
|
||||
/*!
|
||||
\sa {installer::clearComponentsToInstallCalculated}{installer.clearComponentsToInstallCalculated}
|
||||
*/
|
||||
void PackageManagerCore::clearComponentsToInstallCalculated()
|
||||
{
|
||||
d->m_componentsToInstallCalculated = false;
|
||||
}
|
||||
|
||||
/*!
|
||||
\sa {installer::autoAcceptMessageBoxes}{installer.autoAcceptMessageBoxes}
|
||||
\sa autoRejectMessageBoxes(), setMessageBoxAutomaticAnswer()
|
||||
|
@ -293,6 +293,7 @@ public Q_SLOTS:
|
||||
void setCompleteUninstallation(bool complete);
|
||||
void cancelMetaInfoJob();
|
||||
void componentsToInstallNeedsRecalculation();
|
||||
void clearComponentsToInstallCalculated();
|
||||
|
||||
Q_SIGNALS:
|
||||
void aboutCalculateComponentsToInstall() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user