From 6ce8f28ba643d65ccd628ebf2e90b9d2540668f0 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Thu, 13 Feb 2020 12:42:28 +0200 Subject: Add unit tests for CLI option installPackages Also remove extra space and quotation marks from print output Change-Id: I18eb3532ac79f407023e15ef7ebab78ca0a7f59e Reviewed-by: Iikka Eklund --- src/libs/installer/packagemanagercore.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libs/installer/packagemanagercore.cpp') diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index de3ff4e6b..94bb4cd78 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -2172,22 +2172,22 @@ void PackageManagerCore::installSelectedComponentsSilently(const QStringList& co if (idx.isValid()) { if (model->data(idx, Qt::CheckStateRole) == QVariant::Invalid) { // User cannot select the component, check why if (component && component->autoDependencies().count() > 0) - qCDebug(QInstaller::lcInstallerInstallLog) << "Cannot install component "<< name - << "Component is installed only as automatic dependency to "<< component->autoDependencies().join(QLatin1Char(',')); + qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << "Cannot install component "<< name + << ". Component is installed only as automatic dependency to "<< component->autoDependencies().join(QLatin1Char(',')) << "."; if (component && !component->isCheckable()) - qCDebug(QInstaller::lcInstallerInstallLog) << "Cannot install component "<< name + qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << "Cannot install component "<< name <<". Component is not checkable meaning you have to select one of the subcomponents."; } else if (component->isInstalled()) { - qCDebug(QInstaller::lcInstallerInstallLog) << "Component " << name <<" already installed"; + qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << "Component " << name <<" already installed"; } else { model->setData(idx, Qt::Checked, Qt::CheckStateRole); installComponentsFound = true; } } else { // idx is invalid and component valid when we have invisible virtual component if (component && component->isVirtual()) - qCDebug(QInstaller::lcInstallerInstallLog) << "Cannot install " << name <<". Component is virtual."; + qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << "Cannot install " << name <<". Component is virtual."; else - qCDebug(QInstaller::lcInstallerInstallLog) << "Cannot install " << name <<". Component not found."; + qCDebug(QInstaller::lcInstallerInstallLog).noquote().nospace() << "Cannot install " << name <<". Component not found."; } } if (installComponentsFound) { -- cgit v1.2.3