From ab25df8328d9248abc2816403e6051e00d5b1095 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Wed, 18 Oct 2023 11:13:35 +0200 Subject: [PATCH] qt: Handle cancel in changeexpiryjob * lang/qt/src/qgpgmechangeexpiryjob.cpp (change_expiry): Return cancel error. -- The classical "cancel is not an error" problem. GnuPG-Bug-Id: T6754 --- lang/qt/src/qgpgmechangeexpiryjob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/qt/src/qgpgmechangeexpiryjob.cpp b/lang/qt/src/qgpgmechangeexpiryjob.cpp index 3cca6ca8..c6cb3f85 100644 --- a/lang/qt/src/qgpgmechangeexpiryjob.cpp +++ b/lang/qt/src/qgpgmechangeexpiryjob.cpp @@ -103,7 +103,7 @@ static QGpgMEChangeExpiryJob::result_type change_expiry(Context *ctx, const Key if (subkeys.empty() || (options & ChangeExpiryJob::UpdatePrimaryKey)) { // update the expiration date of the primary key auto err = ctx->setExpire(key, expires); - if (err) { + if (err || err.isCanceled()) { return std::make_tuple(err, QString(), Error()); } }