[Maniphest] [Commented On] T3300: Refactor Archive loading
elvisangelaccio (Elvis Angelaccio)
noreply at phabricator.kde.org
Fri Sep 16 11:34:25 UTC 2016
elvisangelaccio added a comment.
The biggest problem is: how do we deal with non-existing archives? We use `Archive *Archive::create("non-existing-path")` when we create a new archive (e.g. in `Part` and `AddToArchive`), but the goal is to make those `create()` methods private.
We could add another wrapper job, e.g. `CreateJob *Archive::create(...)` that internally calls `AddJob`. In practice:
1. If an archive already exists, we have an `Archive` pointer and we can just call `Archive::addFiles()` like we already do.
2. If we need to create a new archive, we do `auto createJob = Archive::create()` and then, after the job is done, we retrieve the archive (`Archive *archive = createJob->archive();`).
TASK DETAIL
https://phabricator.kde.org/T3300
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: elvisangelaccio
Cc: kde-utils-devel, elvisangelaccio, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20160916/162fc28f/attachment.html>
More information about the Kde-utils-devel
mailing list