Bug 341125

Summary: Current track view truncates after “less than” (<) symbols
Product: [Applications] amarok Reporter: Philipp A. <flying-sheep>
Component: Context View/Current TrackAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED DUPLICATE    
Severity: minor    
Priority: NOR    
Version: 2.8.0   
Target Milestone: 2.9   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Philipp A. 2014-11-20 12:59:23 UTC
I’m currently listening to deadmau5’ new album “while(1<2)”, but the album title is truncated in the current track view to “while(1”.

Logically, while(1) is the same as while(1<2) in most languages, but my brain has a parse_error: unbalanced parentheses (missing 1 closing parenthesis), so this needs to be fixed!

My assumption is that the view misses a label.setTextFormat(Qt::PlainText) somewhere, and is interpreting the title as rich text: http://qt-project.org/doc/qt-5/richtext-html-subset.html

Reproducible: Always
Comment 1 Philipp A. 2014-11-20 13:28:20 UTC
Hmm, it isn’t a QLabel, but one of Amarok’s TextScrollingWidgets.

note that this is indeed about the “<”, not the regular truncating of that widget as 1. it should shroll on hover then, 2. there’s no ellipsis and 3. there is space left and the album artist is longer than the title and not truncated.

relevant code is here:

https://projects.kde.org/projects/extragear/multimedia/amarok/repository/revisions/master/entry/src/context/applets/currenttrack/CurrentTrack.cpp
https://projects.kde.org/projects/extragear/multimedia/amarok/repository/revisions/master/entry/src/context/widgets/TextScrollingWidget.cpp

the fix of bug 220714 also uses a TextScrollingWidget, but in order do *do* rich text interpretation, so i’m going to assume it interprets rich text, and we need a way to tell it to stop.
Comment 2 Myriam Schweingruber 2014-11-20 13:43:39 UTC
FWIW: we still use Qt4, not Qt5...

Which version is this about 2.8 or current git?
Comment 3 Philipp A. 2014-11-21 15:40:00 UTC
2.8. sorry for being lazy and not entering it, but i thought “Archlinux Packages” would make it obvious.
Comment 4 Philipp A. 2014-11-21 15:43:41 UTC
welp, that makes the culprit clear:

https://projects.kde.org/projects/extragear/multimedia/amarok/repository/entry/src/context/widgets/TextScrollingWidget.cpp?rev=v2.8.0#L86

doc.setHtml( str );
text = doc.toPlainText();

…is definitely NOT what we want.

but apparently all those HTML shenanigans seem to be gone in git master.

can somebody confirm that git amarok allows literal “less than” signs in album titles?
Comment 5 Philipp A. 2014-11-21 15:48:02 UTC
…aand actually reading the history makes me realize this is a dupe of bug 324614 (which was fixed in a commit)

*** This bug has been marked as a duplicate of bug 324614 ***