Support was added for editing comments in supported archive types (currently only RAR). A new bool was added to plugin json files ("SupportsWriteComment") to indicate support. A new action (Edit Comment) was added and is found in Archive menu. The editing of comment is done in the same QPlainTextEdit used to display comment before. When user modifies comment, a KMessageWidget pops up with a "Save" button. Actual saving of comment to archive is achieved by a new job type (CommentJob).
Details
Details
- All unit tests pass.
- Open RAR archive with comment -> QPlaintTextEdit is visible and editable.
- Open Zip archive with comment -> QPlaintTextEdit is visible and readonly.
Diff Detail
Diff Detail
- Repository
- R36 Ark
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
One more thing, we should try to call the new action "Add Comment" (instead of "Edit Comment") if the archive has no comment yet.
It should be possible by checking this in updateActions()
kerfuffle/archive_kerfuffle.cpp | ||
---|---|---|
179 ↗ | (On Diff #3575) | Q_ASSERT(isReadOnly()); here |
kerfuffle/cliinterface.cpp | ||
701 ↗ | (On Diff #3575) | Copy-pasted comment, drop it :p |
1182 ↗ | (On Diff #3575) | Missing emit finished(false) here. The process is not running, so must be done manually. |
kerfuffle/cliinterface.h | ||
464 ↗ | (On Diff #3575) | Please initialize this to null in the constructor, and delete it either in the destructor on in processFinished(). If you don't delete it the temp file won't be removed. |
part/part.cpp | ||
456 ↗ | (On Diff #3575) | Now that we have this function, can you also call it from Part::slotLoadingFinished() (~line 744-745)? |