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
This commit is contained in:
Andre Heinecke 2023-10-18 11:13:35 +02:00
parent 5c7e4d252a
commit ab25df8328
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C

View File

@ -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());
}
}