summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore.h
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2023-01-10 14:17:21 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2023-01-26 15:25:41 +0200
commit50575212455fbd3109adbe92d8509fca3c51850a (patch)
treec098c162795ec071653ffe082dda782b61edb813 /src/libs/installer/packagemanagercore.h
parentf5750078a7a75e7ad7b0260b54236ee87f3900f9 (diff)
Support detecting invalid dependency resolutions on component selection
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>
Diffstat (limited to 'src/libs/installer/packagemanagercore.h')
-rw-r--r--src/libs/installer/packagemanagercore.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h
index 26fa8e086..fb1eee160 100644
--- a/src/libs/installer/packagemanagercore.h
+++ b/src/libs/installer/packagemanagercore.h
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2022 The Qt Company Ltd.
+** Copyright (C) 2023 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -239,12 +239,15 @@ public:
Q_INVOKABLE bool calculateComponentsToInstall() const;
QList<Component*> orderedComponentsToInstall() const;
- bool calculateComponents(QString *displayString);
+
+ Q_INVOKABLE bool recalculateAllComponents();
+ QString componentResolveReasons() const;
Q_INVOKABLE bool calculateComponentsToUninstall() const;
QList<Component*> componentsToUninstall() const;
QString componentsToInstallError() const;
+ QString componentsToUninstallError() const;
QString installReason(Component *component) const;
QString uninstallReason(Component *component) const;
@@ -360,8 +363,8 @@ public Q_SLOTS:
void languageChanged();
void setCompleteUninstallation(bool complete);
void cancelMetaInfoJob();
- void componentsToInstallNeedsRecalculation();
- void clearComponentsToInstallCalculated();
+ void componentsToInstallNeedsRecalculation(); // TODO: deprecated, remove
+ void clearComponentsToInstallCalculated() {} // TODO: deprecated, remove
Q_SIGNALS:
void aboutCalculateComponentsToInstall() const;