diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2020-03-30 16:42:21 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2020-04-07 15:43:00 +0300 |
commit | 21aef7e78341b1931ca029dda5e5118172bdaafa (patch) | |
tree | ece1e5c3900cca1fa300fb9447ea0df11054b874 /src/libs/installer/packagemanagercore.cpp | |
parent | d3021e3cc23b7df322bf9dd7f80df5bbde7cc166 (diff) |
Remove existing installation from command line
Add new "purge" command to command line interface. This removes
all components and all program directory contents. Add test
function to unit tests.
Task-number: QTIFW-1574
Change-Id: Iccd4a052c7e2fc8eec0a6ae2b5a93c0c607604cb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagercore.cpp')
-rw-r--r-- | src/libs/installer/packagemanagercore.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 55a143ceb..0a5eec513 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -2219,6 +2219,22 @@ bool PackageManagerCore::uninstallComponentsSilently(const QStringList& componen } /*! + Uninstalls all installed components without GUI and removes + the program directory. Returns \c true if components are + uninstalled successfully, otherwise returns \c false. +*/ +bool PackageManagerCore::removeInstallationSilently() +{ + if (d->runningProcessesFound()) + throw Error(tr("Running processes found.")); + + autoRejectMessageBoxes(); + + setCompleteUninstallation(true); + return run(); +} + +/*! Installs the selected components \a components without displaying a user interface. Virtual components cannot be installed unless made visible with --show-virtual-components. AutoDependOn nor non-checkable components cannot |