diff options
author | Katja Marttila <katja.marttila@qt.io> | 2022-04-13 07:27:36 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2022-04-21 14:57:13 +0300 |
commit | bda347d641ba6fdbec5f201bb89e1a8ac88b4c5b (patch) | |
tree | edd8443a83b5575bd6797ef7383f42dbad8ad53a /src/libs | |
parent | a24b9567929f5f38cefea77c6f2d05d7a54d7986 (diff) |
Speed up Next button click in tree view
Components were recalculated when leaving the tree view. This is
unnecessary as we have just calculated the components. Moving the
recalculation to Introduction page so alternate pressing of 'Add or
remove components' and 'Update components' will cause the recalculation
as we need that to keep the component install states in sync.
Task-number: QTIFW-2598
Task-number: QTIFW-694
Change-Id: Ia84a01b4f1d0b39b4844c02470b764c4940e943c
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/installer/componentselectionpage_p.cpp | 4 | ||||
-rw-r--r-- | src/libs/installer/packagemanagergui.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/libs/installer/componentselectionpage_p.cpp b/src/libs/installer/componentselectionpage_p.cpp index 7717f4cf3..e775c0cb4 100644 --- a/src/libs/installer/componentselectionpage_p.cpp +++ b/src/libs/installer/componentselectionpage_p.cpp @@ -195,10 +195,6 @@ ComponentSelectionPagePrivate::ComponentSelectionPagePrivate(ComponentSelectionP connect(m_core, &PackageManagerCore::metaJobTotalProgress, this, &ComponentSelectionPagePrivate::setTotalProgress); - // force a recalculation of components to install to keep the state correct - connect(q, &ComponentSelectionPage::left, - m_core, &PackageManagerCore::clearComponentsToInstallCalculated); - #ifdef INSTALLCOMPRESSED allowCompressedRepositoryInstall(); #endif diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index 40275e273..1075f83fe 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -1895,6 +1895,9 @@ void IntroductionPage::entering() */ void IntroductionPage::leaving() { + // force a recalculation of components to install to keep the state correct + if (!packageManagerCore()->isUninstaller()) + packageManagerCore()->componentsToInstallNeedsRecalculation(); m_progressBar->setValue(0); m_progressBar->setRange(0, 0); setButtonText(QWizard::CancelButton, gui()->defaultButtonText(QWizard::CancelButton)); |