[Differential] [Request, 356 lines] D1749: Add new jobs to preview/open a file
elvisangelaccio (Elvis Angelaccio)
noreply at phabricator.kde.org
Thu Jun 2 16:33:50 UTC 2016
elvisangelaccio created this revision.
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio added a subscriber: kde-utils-devel.
elvisangelaccio set the repository for this revision to rARK Ark.
elvisangelaccio added a project: Ark.
REVISION SUMMARY
The goal of task https://phabricator.kde.org/T916 is to stop disabling the Part UI while extracting an entry. To do so, we need first to make sure that no race condition would occur if extracting two or more entries in parallel.
A race condition might occur in `Part::slotOpenExtractedEntry()`, where `m_openFileMode` is a global member that could be accessed concurrently between different threads. We can stop using this variable if we introduce dedicated jobs for preview/opening of files. This way we can simply do a dynamic_cast on the local `job` variable, to check whether the user wants to open or open-with the file.
Preview is totally unrelated so it can be moved into a different slot. We can also make sure that the `PreviewJob` deletes the temporary directory upon completion.
TEST PLAN
- Preview, open and open-with an entry in an archive.
- Make sure that the temporary directory is deleted when closing ark
- Make sure that an open file can still be edited (and the archive is updated)
REPOSITORY
rARK Ark
REVISION DETAIL
https://phabricator.kde.org/D1749
AFFECTED FILES
autotests/kerfuffle/data/archive-malicious.json
autotests/kerfuffle/jobstest.cpp
kerfuffle/archive_kerfuffle.cpp
kerfuffle/archive_kerfuffle.h
kerfuffle/jobs.cpp
kerfuffle/jobs.h
part/archivemodel.cpp
part/archivemodel.h
part/part.cpp
part/part.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: elvisangelaccio, rthomsen
Cc: kde-utils-devel, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20160602/5c52e032/attachment.html>
More information about the Kde-utils-devel
mailing list