Summary: | Make "Cancel" possible within an operation, when clicked at a convenient point | ||
---|---|---|---|
Product: | [Applications] partitionmanager | Reporter: | ulterno |
Component: | general | Assignee: | Andrius Štikonas <andrius> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version First Reported In: | 25.04.1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
ulterno
2025-06-18 07:55:30 UTC
Yeah, something seems to be broken, I thought it already behaves as you described. Must be some regression. Oh apparently it was never supported... Check points are indeed only at the end of the operation. One would have to insert checkpoints into each operation::execute function at appropriate places, e.g. for resizeoperation need to look at https://invent.kde.org/system/kpmcore/-/blob/master/src/ops/resizeoperation.cpp?ref_type=heads#L140 and insert something like https://invent.kde.org/system/kpmcore/-/blob/dffcfa31054576a21411125be7c9634dc12432e7/src/core/operationrunner.cpp#L56 There are some minor problems: isCancelling is only available from OperationRunner, not available in operations classes, so we would have to make it available there somehow. But at the same time, OperationRunner is not required to use Operations, e.g. Calamares installer uses KPMcore operations but not OperationRunner. Perhaps one could pass a pointer to Operation::execute() that is nullptr by default. And then checkpoint is only checked if pointer to OperationRunner is not null. |