Three new ints were added to plugin json files specifying minimum, maximum and default compression level for each readwrite mimetype. A new KCollapsibleGroupBox with a QSlider was added to CreateDialog to allow setting the compression level.
Details
Diff Detail
- Repository
- R36 Ark
- Lint
Lint Skipped - Unit
Unit Tests Skipped
kerfuffle/archiveformat.cpp | ||
---|---|---|
63 | Initialize this to Archive::Unencrypted, so that you can drop the else branch below. | |
kerfuffle/archiveformat.h | ||
41–70 | What about using an enum here? Something like: enum CompressionLevel { MIN, MAX, DEFAULT } Then you would only need one class member and one accessor method. | |
kerfuffle/cliinterface.cpp | ||
255–258 | Shorter version: options.value(QStringLiteral("CompressionLevel"), -1).toInt() | |
656 | Please move this check within compressionLevelSwitch() (to be consistent with the other switch functions). If the level is -1, the function should return an empty string. | |
kerfuffle/createdialog.ui | ||
148 | I don't think we should expand it by default. Otherwise the user might think that he's forced to choose a compression level. | |
154 | Not sure about the "Less" and "More" labels. Maybe "Min" and "Max" would be better? | |
plugins/clizipplugin/kerfuffle_clizip.json | ||
61 | Call this key CompressionLevelDefault ? | |
plugins/libarchive/kerfuffle_libarchive.json | ||
59–63 | These are unnecessary, you can remove them. QJsonValue::toInt() already defaults to 0 if the key is not found. |