summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore.h
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2020-09-23 19:37:31 +0300
committerKatja Marttila <katja.marttila@qt.io>2020-09-25 10:32:30 +0300
commit02f8711dc250b4c4f07ea7b43cbb0904496b1cb3 (patch)
tree91357567cd4dfe0c0df14e2b21f5ef871fcce14e /src/libs/installer/packagemanagercore.h
parent557feae54796a861f6076d30df17958e14debb4c (diff)
CLI: Give more meaningfull return value for installs
Instead of returning just true or false when running installer or maintenancetool, utilize the PackagemanagerCore status message. Added also a new status enum, EssentialUpdated, which is returned when calling command 'update' and only essential components are updated. Also fixed a bug when components could be installed even when there were an essential update available. Task-number: QTIFW-1969 Change-Id: I43826301656573b34e1338b49566d199bdcd7468 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagercore.h')
-rw-r--r--src/libs/installer/packagemanagercore.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h
index e02dbeb36..b0feb1a57 100644
--- a/src/libs/installer/packagemanagercore.h
+++ b/src/libs/installer/packagemanagercore.h
@@ -71,10 +71,11 @@ public:
enum Status {
Success = EXIT_SUCCESS,
Failure = EXIT_FAILURE,
- Running,
- Canceled,
- Unfinished,
- ForceUpdate
+ Running = 2,
+ Canceled = 3,
+ Unfinished = 4,
+ ForceUpdate = 5,
+ EssentialUpdated = 6
};
Status status() const;
QString error() const;
@@ -234,11 +235,11 @@ public:
ComponentModel *updaterComponentModel() const;
void listInstalledPackages();
void listAvailablePackages(const QString &regexp);
- bool updateComponentsSilently(const QStringList &componentsToUpdate);
- bool installSelectedComponentsSilently(const QStringList& components);
- bool installDefaultComponentsSilently();
- bool uninstallComponentsSilently(const QStringList& components);
- bool removeInstallationSilently();
+ PackageManagerCore::Status updateComponentsSilently(const QStringList &componentsToUpdate);
+ PackageManagerCore::Status installSelectedComponentsSilently(const QStringList& components);
+ PackageManagerCore::Status installDefaultComponentsSilently();
+ PackageManagerCore::Status uninstallComponentsSilently(const QStringList& components);
+ PackageManagerCore::Status removeInstallationSilently();
// convenience
Q_INVOKABLE void setInstaller();