KPackage: make KPackage::install()'s KJob return a new Package copy rather than modify argument in
Open, Needs TriagePublic

davidedmundson moved this task from Backlog to Waiting on Other Tasks on the KF6 board.

See

src/kpackage/private/package_p.h://TODO KF6 - make KPackage::install()'s KJob return a new Package copy rather than modify

(commit log should contain rationale when I added that TODO)

alex added a subscriber: alex.

Though then we'd need to expose the KJob subclass publicly. Though I do not understand why this is not an issue in KNewStuff, in https://invent.kde.org/frameworks/knewstuff/-/merge_requests/227 I did some refactorings.

KPackage::Package package(structure);
 package.setPath(payloadfile);

 if (package.isValid() && package.metadata().isValid()) {
     KJob *installJob = package.install(payloadfile, packageRoot);
     connect(installJob, &KJob::result, this, [this, entry, payloadfile, expectedDir, resetEntryStatus](KJob *job) {
alex added a comment.Feb 19 2023, 6:40 PM

Makes sense, then it is a cleanup of the internal API and does not fix a crash anymore

alex moved this task from In Progress to Done on the KF6 board.Apr 9 2023, 6:00 PM