Version: 2.0.1.1 (using KDE 4.2.0) OS: Linux Installed from: Compiled From Sources Symptom: Weight percentages of dynamic playlists aren't loaded (all entries are set to 0%) after saving them and re-opening amarok. Using LANG=de_DE.UTF-8@euro. Reason: When saving the dynamic playlist (~/.kde4.2/share/apps/amarok/dynamic.xml), double float values are saved locale dependend: <weight value="0,4" /> instead of <weight value="0.4" /> (note the comma!) This is a bug/feature of QDomElement setAttribute ( const QString & name, double value ) Refer to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=483289 for details. Instead of using weight.setAttribute( "value", m_weight ); you can use weight.setAttribute( "value", QString::number( m_weight, 'f', 16 ) );
Created attachment 31290 [details] Patch against 2.0.1.1 This patch fixes this issue, however there might be other invalid usage of QDomElement setAttribute that I didn't find.
SVN commit 925963 by markey: Save dynamic playlist weight values correctly with both "," and "." as decimal separator. Big thanks for the patch go to Georg Hennig <georg298@gmx.de>. BUG: 184304 M +1 -1 Bias.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=925963
SVN commit 926058 by dmeltzer: Save dynamic playlist weight values correctly with both "," and "." as decimal separator. Big thanks for the patch go to Georg Hennig <georg298@gmx.de>. BUG: 184304 M +1 -1 Bias.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=926058