Bug 447825

Summary: ampersands in tooltips
Product: [Applications] kdenlive Reporter: Peter <Peter>
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: minor CC: fritzibaby
Priority: NOR Flags: fritzibaby: Brainstorm+
Version First Reported In: 21.12.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Showing tooltips with ampersands in the bottom-right corner of the screenshot

Description Peter 2022-01-02 12:26:41 UTC
Many of the tooltips for truncated entries have rogue ampersands.

e.g.

Project &Bin
C&ompositions
&Undo History
&Audio Mixer
Effect/Composition Stac&k
Comment 1 emohr 2022-01-04 13:34:45 UTC
Goto settings -> enables Force Breeze Icon Theme. Check that theme and icons are set to Breeze. Does the ampersand still happen?
Comment 2 Peter 2022-01-04 20:31:21 UTC
(In reply to emohr from comment #1)
> Goto settings -> enables Force Breeze Icon Theme. Check that theme and icons
> are set to Breeze. Does the ampersand still happen?

Hi emohr, thanks for your attention.

The tooltips appear with ampersands when I switch to force breeze, although the theme and style say Default rather than Breeze, they're Breeze Dark and Breeze respectively. Switching these to the other settings doesn't change the content of the tooltips, either.

I'll attach a screenshot of what I mean with the tooltip showing in the very bottom right corner.
Comment 3 Peter 2022-01-04 20:32:13 UTC
Created attachment 145115 [details]
Showing tooltips with ampersands in the bottom-right corner of the screenshot
Comment 4 emohr 2022-01-05 13:03:37 UTC
Thank you for reporting. I can confirm the issue. Tabs have a tooltip only if the full name cannot be displayed on the tab (if you have many tabs the names are elided). This happen on Windows as well.

Working on the solution is ongoing.
Comment 5 Jean-Baptiste Mardelle 2022-01-05 21:45:50 UTC
Git commit be712e7e14b71ed58d09c8d64a9eb0dd5090fa8f by Jean-Baptiste Mardelle.
Committed on 05/01/2022 at 21:45.
Pushed by mardelle into branch 'master'.

Fix tab widget tooltips containing ampersand

M  +1    -0    src/core.cpp
M  +1    -1    src/main.cpp
M  +5    -2    src/mainwindow.cpp
M  +24   -17   src/project/projectmanager.cpp

https://invent.kde.org/multimedia/kdenlive/commit/be712e7e14b71ed58d09c8d64a9eb0dd5090fa8f
Comment 6 Jean-Baptiste Mardelle 2022-01-06 12:37:42 UTC
I did my best to fix it. However this is in fact a long standing Qt bug and still exists using the "Windows" or "Fusion" widget styles - the ampersand is visible in the widget's title bar.

Upstream issues:
https://bugreports.qt.io/browse/QTBUG-54485
https://bugreports.qt.io/browse/QTBUG-86407
Comment 7 emohr 2022-01-06 16:01:19 UTC
On Windows it seems to be fixed. @Peter Please test with the nightly build.
Comment 8 Peter 2022-01-07 17:33:44 UTC
(In reply to emohr from comment #7)
> On Windows it seems to be fixed. @Peter Please test with the nightly build.

That seems to have done the trick, no tooltips have an extra ampersand in any of the Styles I tried in the latest nightly appimage.

Thank you.
Comment 9 emohr 2022-01-07 19:42:12 UTC
Thank you for the feedback and contribution. Glad to hear it works. 

I close this bug. If it still appears in the latest version, please feel free to re-open it and update the affected version number.