From 165769af20327e42c9a92de3c8483d88191a670c Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Tue, 26 Apr 2022 12:13:22 +0300 Subject: Don't print warnings for backup operations when installer is canceled Before this change we would print a warning for each operation when iterating over the results of their asynchronous execution. These are unnecessary as canceling is a conscious action from the user. Change-Id: I2b9bd469b3a3e1c9794c6f2c4952896640cd88da Reviewed-by: Katja Marttila --- src/libs/installer/packagemanagercore_p.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index cbd14b2a8..73738d1cb 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -2222,6 +2222,9 @@ void PackageManagerCorePrivate::unpackComponents(const QList &compo const OperationList backupOperations = backupResults.keys(); for (auto &operation : backupOperations) { + if (m_core->status() == PackageManagerCore::Canceled) + break; // User canceled, no need to print warnings + if (!backupResults.value(operation) || operation->error() != Operation::NoError) { // For Extract, backup stops only on read errors. That means the perform step will // also fail later on, which handles the user selection on what to do with the error. -- cgit v1.2.3