[Amarok] Added some more sortable categories.
Seb Ruiz
ruiz at kde.org
Fri Jul 31 00:49:01 CEST 2009
Two things here Teo:
1. Why not use foreach( QString token, m_sortableCategories ). This
would be much cleaner!
2. I'm never a fan of strings like this directly in the code, it's
very brittle and hard to maintain. Can we simply use the
Meta::Constants or have them declared elsewhere?
2009/7/31 Teo Mrnjavac <teo at getamarok.com>:
> for( QStringList::iterator i = m_sortableCategories.begin(); i!=m_sortableCategories.end(); )
> {
> - if( *i == QString( "Placeholder" ) || *i == QString( "Bpm" )
> + if( *i == QString( "Placeholder" ) || *i == QString( "Bpm" )
> || *i == QString( "Cover image" ) || *i == QString( "Divider" )
> - || *i == QString( "Last played" ) || *i == QString( "Mood" )
> - || *i == QString( "Source" ) || *i == QString( "SourceEmblem" )
> - || *i == QString( "Title (with track number)" ) || *i == QString( "Type" ) )
> + || *i == QString( "Mood" ) || *i == QString( "SourceEmblem" )
> + || *i == QString( "Title (with track number)" ) )
> i = m_sortableCategories.erase( i );
--
Seb Ruiz
http://www.sebruiz.net/
http://amarok.kde.org/
More information about the Amarok-devel
mailing list