Turn extraction/compression options into classes
ClosedPublic

Authored by elvisangelaccio on Oct 12 2016, 3:31 PM.

Details

Summary

Currently they both are QHash typedefs, which means they are the same thing for the
compiler. For this reason if we pass a CompressionOptions object where an
ExtractionOptions object was expected, the code compiles file even if this is a
major design flaw. Currently we have at least a couple of such bugs, so let's fix
them all by using proper types.

While at it:

  • The default value for the PreservePaths option was false, now is true because it's the more common case.
  • The RemoveRootNode option was redundant, it was only used together with the DragAndDrop one.
  • The FollowExtractionDialogSettings was only set but never read, so we can drop it.
Test Plan

Tests still pass.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to Turn extraction/compression options into classes.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
Restricted Application added a project: Ark. · View Herald TranscriptOct 12 2016, 3:31 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
elvisangelaccio updated this revision to Diff 7351.EditedOct 12 2016, 3:38 PM
This comment has been deleted.
  • Forgot to implement the debug functions
  • Drop unused entries count option
  • Fix compression options passed to slotAddFiles()
  • Fix another porting bug
rthomsen requested changes to this revision.Oct 12 2016, 7:31 PM
rthomsen edited edge metadata.
rthomsen added inline comments.
kerfuffle/options.cpp
134

Should be volumeSize.

This revision now requires changes to proceed.Oct 12 2016, 7:31 PM
elvisangelaccio edited edge metadata.
elvisangelaccio marked an inline comment as done.
  • Fix typo in debug function
elvisangelaccio edited edge metadata.
  • Fix more porting bugs
  • More cleanup
rthomsen accepted this revision.Oct 15 2016, 5:01 PM
rthomsen edited edge metadata.

Seems to work properly now :)

This revision is now accepted and ready to land.Oct 15 2016, 5:01 PM
This revision was automatically updated to reflect the committed changes.