On 10/18/21 20:37, Thibaut Cuvelier wrote:
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?

Looks good to me.

Riki



On Mon, 18 Oct 2021 at 15:33, Pavel Sanda <sa...@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@lists.lyx.org
    http://lists.lyx.org/mailman/listinfo/lyx-devel


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to