FS#2225Filenames containing an ampersand do not render correctly in the tab bar and Window menu
- Type
- Bug
- Status
- Closed
- Resolution
- Fixed
- Category
- QCAD (main)
- Severity
- Very Low
- Priority
- Low
- Reported version
- 3.26.1
- Operating system
- All
- Reported
- 2021-04-10 by nsdecicco
- Closed
- 2021-04-10 by andrew
If a file is opened whose filename contains an ampersand, the filename will be rendered correctly in the application titlebar, but the tab bar and the Window menu will not display the ampersand.
If, however, the 'alt' key is pressed, the ampersand will result in an underscore appearing beneath the character immediately following it in the filename string. This applies both to the titlebar and the Window menu.
Interestingly, this can be "exploited" by a user to quickly switch between tabs by pressing 'alt' and the character which follows the ampersand simultaneously. Likewise, a user can swap between windows using the Window menu in a similar fashion, by first pressing Alt+W, then Alt and the same key as before.
The expected result is that the ampersand is rendered, the underscore is not rendered, and the 'alt' key shortcuts don't work.
It would appear that this is a simple case of failing to properly escape the ampersand in filenames before passing the filename string to various Qt methods.


