From 9ea0a22fb01931eb3590818091c1761bfa413d1c Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 25 Jul 2013 17:59:02 +0200 Subject: add component name to operation debug output - set the component name to every operation which comes from a component Change-Id: I3e4a1ab2896f7b469fe6606c7e89127c3d6fbc43 Reviewed-by: Niels Weber Reviewed-by: Karsten Heimrich --- src/libs/installer/component.cpp | 2 +- src/libs/installer/packagemanagercore_p.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index cfa220ab1..79347d12b 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -995,7 +995,7 @@ Operation *Component::createOperation(const QString &operationName, const QStrin operation->setValue(QLatin1String("installer"), qVariantFromValue(d->m_core)); operation->setArguments(d->m_core->replaceVariables(parameters)); - + operation->setValue(QLatin1String("component"), name()); return operation; } diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index bf15f67bb..639eb2189 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -95,7 +95,8 @@ public: { if (!m_operation) return; - qDebug() << QString::fromLatin1("%1 operation: %2").arg(state, m_operation->name()); + qDebug() << QString::fromLatin1("%1 %2 operation: %3").arg(state, m_operation->value( + QLatin1String("component")).toString(), m_operation->name()); qDebug() << QString::fromLatin1("\t- arguments: %1").arg(m_operation->arguments() .join(QLatin1String(", "))); } @@ -1864,7 +1865,6 @@ void PackageManagerCorePrivate::installComponent(Component *component, double pr // Remember that the operation was performed, that allows us to undo it if a following operation // fails or if this operation failed but still needs an undo call to cleanup. addPerformed(operation); - operation->setValue(QLatin1String("component"), component->name()); } if (becameAdmin) -- cgit v1.2.3