Hashing without relying on Qt?
Thibaut Cuvelier
tcuvelier at lyx.org
Tue Oct 19 00:37:21 UTC 2021
Thank you Pavel and Riki for your feedback!
Here is a refactoring of this code. As a result, the execution should be a
tad slower: sanitizeFileName performs a copy of the string (instead of
mutating its argument), while the original version did not, but it's only
for file names, so it should not matter much (especially as the calling
code would not be too strange).
Is the code OK to push as is?
On Mon, 18 Oct 2021 at 15:33, Pavel Sanda <sanda at lyx.org> wrote:
> On Sun, Oct 17, 2021 at 12:09:06AM -0400, Richard Kimberly Heck wrote:
> > >The only solution I found without importing a large new dependency into
> > >LyX was to use Qt's QCryptographicHash, just like support/FileName.cpp.
> I
> > >know that LyX tries to have clear boundaries for dependencies, that's
> why
> > >I'm bringing the question to the list. Is the current solution
> acceptable?
> > >Maybe move some of the code to support/FileName.cpp?
>
> QCryptographicHash in FileName.cpp is probably my doing and you are right,
> that it would be better to abstract qt hasing somewhere into support and
> then use it in FileName & Insettext.
>
> Pavel
> --
> lyx-devel mailing list
> lyx-devel at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211019/d231030a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-DocBook-use-the-new-refactorings-in-InsetText.patch
Type: application/octet-stream
Size: 1994 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211019/d231030a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactor-computing-hashes.patch
Type: application/octet-stream
Size: 3471 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211019/d231030a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Refactor-file-name-sanitisation.patch
Type: application/octet-stream
Size: 3153 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211019/d231030a/attachment-0002.obj>
More information about the lyx-devel
mailing list