Open cuongha0701 opened 2 months ago
Yes, I reproduced on KDE6 + Qt6.7. This is a KDE only bug.
The &
has a special meaning https://doc.qt.io/qt-6/qshortcut.html#details for mnemonic shortcuts.
By holding Alt, the first group tab is highlighted, while the others are not, Alt+Z
will jump to the first tab.
The first tab will trigger this bug.
KDE automatically modifies the text string to include a &
for mnemonic shortcuts, and we do &
escaping, which makes the modification persist.
Escaping on GD's side https://github.com/goldendict/goldendict/commit/ed2876d7b2ab634af5613de136dcfd2340c80a7c
Previous similar bugs:
https://github.com/goldendict/goldendict/issues/847 https://github.com/goldendict/goldendict/issues/1031
A possible solution: 1, when add new group , escape the & character. 2, when display ,do not escape the & character.
1, when add new group , escape the & character.
This is exactly what GD is doing 😅.
I think the root fix is either
Gd-ng has done the following two things: 1, when add new group , escape the & character. 2, when display ,escape the & character. (DO NOT NEEDED)
only 1 is needed.
Describe the bug GoldenDict keep adding "&" character in group name
To Reproduce Steps to reproduce the behavior:
Screenshots![Screenshot_20240428_115805](https://github.com/xiaoyifang/goldendict-ng/assets/34791382/f70d2b42-6e21-478e-9ae4-66664445c52f)
OS and software versions KDE Plasma 6.0.4 Goldendict-ng 24.02.16.e78aff27 at 2024-04-24T04:58:00Z Qt 6.7.0 GCC 13.2.1 20230801 arch linux 6.8.7-arch1-2 x86_64-little_endian-lp64 Flags: MAKE_ZIM_SUPPORT USE_ICONV MAKE_CHINESE_CONVERSION_SUPPORT