Add MD5 and SHA hashes to properties dialog
ClosedPublic

Authored by rthomsen on Mar 12 2016, 7:58 PM.

Details

Summary

Use QCryptographicHash to calculate MD5 hash and show it in properties dialog. The hash is selectable with mouse for easy copying.

I tried adding SHA-1 and SHA-256 hashes, but QCryptographicHash provides the wrong hashes (compared to sha1sum/sha256sum).

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.
rthomsen updated this revision to Diff 2750.Mar 12 2016, 7:58 PM
rthomsen retitled this revision from to Add MD5 hash to properties dialog.
rthomsen updated this object.
rthomsen edited the test plan for this revision. (Show Details)
rthomsen added a reviewer: elvisangelaccio.
rthomsen set the repository for this revision to R36 Ark.
rthomsen added a project: Ark.
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptMar 12 2016, 7:58 PM
rthomsen updated this revision to Diff 2754.Mar 13 2016, 12:46 PM
rthomsen retitled this revision from Add MD5 hash to properties dialog to Add MD5 and SHA-1 hashes to properties dialog.

Added SHA-1 sum. The reason the SHA-1 sum was wrong before was that I didn't reopen the file. I didn't add the SHA-256 because it makes the dialog too wide in my opinion.

rthomsen updated this revision to Diff 2756.Mar 13 2016, 4:29 PM
rthomsen retitled this revision from Add MD5 and SHA-1 hashes to properties dialog to Add MD5 and SHA hashes to properties dialog.

Calculate SHA-1 and SHA-256 sums asynchronously.

rthomsen updated this revision to Diff 2759.Mar 13 2016, 9:16 PM

The width of the dialog is now fixed at the size of the SHA-256 sum (64 digits) to prevent resizing of the dialog when the hashes are calculated. The hashes are shown with monospace font to enable this hack.

rthomsen updated this object.Mar 13 2016, 9:17 PM
elvisangelaccio accepted this revision.Mar 13 2016, 10:28 PM
elvisangelaccio edited edge metadata.

Good to go!

This revision is now accepted and ready to land.Mar 13 2016, 10:28 PM
This revision was automatically updated to reflect the committed changes.