kleiner-brauhelfer / kleiner-brauhelfer-2

kleiner-brauhelfer v2.x.x
http:///kleiner-brauhelfer.github.io
GNU General Public License v3.0
84 stars 35 forks source link

Qt6: Duplicated information in webviews #289

Closed martinkunkel2 closed 1 year ago

martinkunkel2 commented 1 year ago

software: master, rev. 1a740aa3bdfb62f13e3966a5dc8422155c755566 build from source with Qt_6_2_4_MSVC2019_64bit-Release

I experience the problem that data is duplicated in webviews, see these example screenshots: issue-duplicated-data issue-duplicated-comment

Here is minimal reproduction image

The value of "Rezept.Wasserprofil" is duplicated in the output. And the number of duplicates equals the number of characters in the string, here: "Lavendelweg".

I could narrow down the problem to the usage of mustache in the webviews. As far as I understand it, mustache first checks if Rezept.Wasserprofil can be converted to a list: https://github.com/kleiner-brauhelfer/kleiner-brauhelfer-2/blob/82382ed7a0c043f5bb3fe0ec43c6459edef58323/kleiner-brauhelfer/helper/mustache.cpp#L190 If this can be converted, then the template between start and end tag is repeated for each list item. For the string, this is the number of characters.

Is this problem reproducible for other users as well?

BourgeoisLab commented 1 year ago

Qt 6 is not supported yet, but I am working on it. Thanks for narrowing the problem. I can reproduce it.

martinkunkel2 commented 1 year ago

Thank you for the quick feedback. I retried with Qt 5.15.2 and with Qt 5 the issue is not reproducible.

BourgeoisLab commented 1 year ago

The fix is easy. See https://github.com/robertknight/qt-mustache/pull/36 I will make the correction in the repo soon.

BourgeoisLab commented 1 year ago

Solved with 417e15a5c422eb580796da23d42bf1d99db395b3.