diff options
author | Katja Marttila <katja.marttila@qt.io> | 2020-03-23 12:35:24 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2020-03-25 06:35:50 +0200 |
commit | d904f6c2bfff83e9b77a20d14bb8d4d434797f72 (patch) | |
tree | c56bf6eadcd3f34a637a5922dc56e78fa63bd754 /src/libs/installer/packagemanagercore.cpp | |
parent | ab446a093ddda088659e94ab8ba513361ad87643 (diff) |
Create unit tests for CLI option uninstallPackages
Task-number: QTIFW-1638
Change-Id: I027ce7d70cb5a49f1c2a2ed39979a0d3c8773282
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagercore.cpp')
-rw-r--r-- | src/libs/installer/packagemanagercore.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 8d3754f8a..d9e283236 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -2091,10 +2091,10 @@ bool PackageManagerCore::componentUninstallableFromCommandLine(const QString &co if (model->data(idx, Qt::CheckStateRole) == QVariant::Invalid) { // Component cannot be unselected, check why if (component->forcedInstallation()) { - qCWarning(QInstaller::lcInstallerUninstallLog) + qCWarning(QInstaller::lcInstallerUninstallLog).noquote() << "Cannot uninstall ForcedInstallation component" << component->name(); } else if (component->autoDependencies().count() > 0) { - qCWarning(QInstaller::lcInstallerUninstallLog) << "Cannot uninstall component" + qCWarning(QInstaller::lcInstallerUninstallLog).noquote() << "Cannot uninstall component" << componentName << "because it is added as auto dependency to" << component->autoDependencies().join(QLatin1Char(',')); } @@ -2170,6 +2170,11 @@ bool PackageManagerCore::updateComponentsSilently(const QStringList &componentsT return true; } +void PackageManagerCore::commitSessionOperations() +{ + d->commitSessionOperations(); +} + /*! Uninstalls the selected components \a components without GUI. Returns \c true if components are uninstalled and the maintenance tool @@ -2196,7 +2201,7 @@ bool PackageManagerCore::uninstallComponentsSilently(const QStringList& componen uninstallComponentFound = true; } } else { - qCWarning(QInstaller::lcInstallerUninstallLog) << "Cannot uninstall " << componentName <<". Component not found in install tree."; + qCWarning(QInstaller::lcInstallerUninstallLog).noquote().nospace() << "Cannot uninstall component " << componentName <<". Component not found in install tree."; } } |