diff options
author | Katja Marttila <katja.marttila@qt.io> | 2022-01-18 16:17:54 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2022-01-19 14:24:42 +0200 |
commit | fa53b14796babd4ec4b44a05fa7724315a18bd63 (patch) | |
tree | 9e01ab80ec75c21d33297e9b92a808f4bd5fc9ee /src/libs/installer/uninstallercalculator.h | |
parent | da7d37000dc885d4f7c2d135d6ea1a080d4548f8 (diff) |
Make Updater -view checkbox selection faster
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>
Diffstat (limited to 'src/libs/installer/uninstallercalculator.h')
-rw-r--r-- | src/libs/installer/uninstallercalculator.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs/installer/uninstallercalculator.h b/src/libs/installer/uninstallercalculator.h index a684c92cc..4d1f8816a 100644 --- a/src/libs/installer/uninstallercalculator.h +++ b/src/libs/installer/uninstallercalculator.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -38,11 +38,12 @@ namespace QInstaller { class Component; +class PackageManagerCore; class INSTALLER_EXPORT UninstallerCalculator { public: - UninstallerCalculator(const QList<Component *> &installedComponents); + UninstallerCalculator(const QList<Component *> &installedComponents, PackageManagerCore *core); QSet<Component*> componentsToUninstall() const; @@ -55,6 +56,7 @@ private: QList<Component *> m_installedComponents; QSet<Component *> m_componentsToUninstall; + PackageManagerCore *m_core; }; } |