Review Request 128283: Add checksums tab to the properties dialog
Elvis Angelaccio
elvis.angelaccio at kdemail.net
Wed Jun 29 16:02:08 UTC 2016
> On June 29, 2016, 3:33 p.m., Friedrich W. H. Kossebau wrote:
> > src/widgets/kpropertiesdialog.cpp, line 2628
> > <https://git.reviewboard.kde.org/r/128283/diff/6/?file=470493#file470493line2628>
> >
> > I propose to not cache the colors here, but instead fetch them when needed. There is no real performance gain to cache them.
> > And the cache might only result in conflicts in case somebody changes the system colors while the cache is active.
Good point, indeed someone could change the system colors while the dialog is open!
> On June 29, 2016, 3:33 p.m., Friedrich W. H. Kossebau wrote:
> > src/widgets/kpropertiesdialog.cpp, line 2807
> > <https://git.reviewboard.kde.org/r/128283/diff/6/?file=470493#file470493line2807>
> >
> > Not sure, but is QRegularExpression doing exact matches by default? IIRC other than QRegExp it does not, but also returns true on partial matches in the given string.
> > No time to check in details myself right now, so just asking you to give this a check, unless you are sure it is not an issue.
Right, QRegularExpression doesn't do exact matches by default (which is why in detectAlgorithm() I'm starting from the longest checksum: sha256 -> sha1 -> md5).
I'll try to add the ^ and $ anchors to the patterns, this should be enough to enable exact matches.
- Elvis
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128283/#review96960
-----------------------------------------------------------
On June 29, 2016, 2:37 p.m., Elvis Angelaccio wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128283/
> -----------------------------------------------------------
>
> (Updated June 29, 2016, 2:37 p.m.)
>
>
> Review request for KDE Frameworks, KDE Usability and David Faure.
>
>
> Repository: kio
>
>
> Description
> -------
>
> This patch adds a Checksums tab in the properties dialog, where the user can retrieve and verify the most popular checksum algorithms (md5, sha1 and sha256).
>
> To simplify the implementation, the checksums are computed as soon as the user opens the dialog. This can take a while if the file is huge (in particular with sha256), but the computation happens in another thread and in practice this should not be a performance problem.
>
> The tab is available only for readable local files (no simlinks) and only when there is a single selection.
>
> Please note that some of the labels in the screenshots are clipped due to a bug in breeze: https://bugs.kde.org/show_bug.cgi?id=364426
>
>
> Diffs
> -----
>
> src/widgets/CMakeLists.txt f906577
> src/widgets/checksumswidget.ui PRE-CREATION
> src/widgets/kpropertiesdialog.cpp d0a2faa
> src/widgets/kpropertiesdialog_p.h c01554e
>
> Diff: https://git.reviewboard.kde.org/r/128283/diff/
>
>
> Testing
> -------
>
> * Check whether the computed values match the values from md5sum, sha1sum, sha256sum.
> * Check whether the line edits get a green background if the computed and expected values match.
> * Check whether the line edits get a red background if the computed and expected values differ.
>
>
> File Attachments
> ----------------
>
> MD5 ready to be shared
> https://git.reviewboard.kde.org/media/uploaded/files/2016/06/26/b882fad9-85b0-4250-9743-3549339e6718__Spectacle.l10844.png
> Default dialog
> https://git.reviewboard.kde.org/media/uploaded/files/2016/06/27/ad06e136-7ce3-4876-a594-98fbc64f5538__Spectacle.M13222.png
> Mismatch
> https://git.reviewboard.kde.org/media/uploaded/files/2016/06/27/99838e45-d9c5-4a14-b26a-9440f0249c4b__Spectacle.V13222.png
> Match
> https://git.reviewboard.kde.org/media/uploaded/files/2016/06/27/519fa28f-7c7d-4bb4-bd24-622d18d7f2e2__Spectacle.v13222.png
> Invalid checksum
> https://git.reviewboard.kde.org/media/uploaded/files/2016/06/27/a243c830-2dc0-4cbd-95e9-8f1684bc86a4__Spectacle.J13336.png
>
>
> Thanks,
>
> Elvis Angelaccio
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160629/eb566b9e/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list